Skip to content

Commit

Permalink
Remove explicit list of packages in setup.py. Makes setup.py capable …
Browse files Browse the repository at this point in the history
…of build.
  • Loading branch information
lmazuel committed Jul 8, 2016
1 parent 759d9c9 commit 329ed43
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 166 deletions.
63 changes: 0 additions & 63 deletions build.ps1

This file was deleted.

38 changes: 0 additions & 38 deletions build_conda.bat

This file was deleted.

38 changes: 0 additions & 38 deletions build_conda.sh

This file was deleted.

47 changes: 20 additions & 27 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,33 @@
# limitations under the License.
#--------------------------------------------------------------------------

import os
import os.path
import glob
import copy
import sys
import runpy

root_folder = os.path.abspath(os.path.dirname(__file__))

# order is significant, start from the leaf nodes
packages = [
'azure-nspkg',
'azure-common',
'azure-mgmt-nspkg',
'azure-mgmt-authorization',
'azure-mgmt-batch',
'azure-mgmt-cdn',
'azure-mgmt-cognitiveservices',
'azure-mgmt-commerce',
'azure-mgmt-compute',
'azure-mgmt-logic',
'azure-mgmt-graphrbac',
'azure-mgmt-network',
'azure-mgmt-notificationhubs',
'azure-mgmt-powerbiembedded',
'azure-mgmt-redis',
'azure-mgmt-resource',
'azure-mgmt-scheduler',
'azure-mgmt-storage',
'azure-mgmt-web',
'azure-graphrbac',
'azure-batch',
'azure-servicebus',
'azure-servicemanagement-legacy',
]
packages = [os.path.dirname(p) for p in glob.glob('azure*/setup.py')]

# order is significant for "install":
# - Install nspkg first
# - Then install content package
# - Then install meta-package

# Extract nspkg and sort nspkg by number of "-"
nspkg_packages = [p for p in packages if "nspkg" in p]
nspkg_packages.sort(key = lambda x: len([c for c in x if c == '-']))

# Manually push meta-packages at the end
meta_package = ['azure', 'azure-mgmt']

# So content packages are:
content_package = [p for p in packages if p not in meta_package+nspkg_packages]

# Package final order:
packages = nspkg_packages + content_package + meta_package

for pkg_name in packages:
pkg_setup_folder = os.path.join(root_folder, pkg_name)
Expand Down

0 comments on commit 329ed43

Please sign in to comment.