Skip to content

Commit 62fa2ee

Browse files
committed
Update pkg to pep 420 standards
1 parent db2a5e0 commit 62fa2ee

File tree

4 files changed

+21
-9
lines changed

4 files changed

+21
-9
lines changed

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ include LICENSE.txt
77
include MANIFEST.in
88
include HISTORY.rst
99
include requirements.txt
10-
include azure_bdist_wheel.py
10+
include azure/__init__.py
1111

1212
prune docs/_build

azure/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
__import__('pkg_resources').declare_namespace(__name__)
1+
from pkgutil import extend_path
2+
__path__ = extend_path(__path__, __name__)

azure/datalake/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
__import__('pkg_resources').declare_namespace(__name__)
1+
from pkgutil import extend_path
2+
__path__ = extend_path(__path__, __name__)

setup.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@
55
from io import open
66
import re
77
try:
8-
from azure_bdist_wheel import cmdclass
8+
import azure
9+
try:
10+
ver = azure.__version__
11+
raise Exception(
12+
'This package is incompatible with azure=={}. '.format(ver) +
13+
'Uninstall it with "pip uninstall azure".'
14+
)
15+
except AttributeError:
16+
pass
917
except ImportError:
10-
from distutils import log as logger
11-
logger.warn("Wheel is not available, disabling bdist_wheel hook")
12-
cmdclass = {}
18+
pass
1319

1420
with open('README.rst', encoding='utf-8') as f:
1521
readme = f.read()
@@ -44,7 +50,11 @@
4450
'Programming Language :: Python :: 3.6',
4551
'License :: OSI Approved :: MIT License',
4652
],
47-
packages=find_packages(exclude=['tests']),
53+
packages=find_packages(exclude=['tests',
54+
# Exclude packages that will be covered by PEP420 or nspkg
55+
'azure',
56+
'azure.datalake.store',
57+
]),
4858
install_requires=[
4959
'cffi',
5060
'adal>=0.4.2',
@@ -53,8 +63,8 @@
5363
extras_require={
5464
":python_version<'3.4'": ['pathlib2'],
5565
":python_version<='2.7'": ['futures'],
66+
":python_version<'3.0'": ['azure-mgmt-nspkg'],
5667
},
5768
long_description=readme + '\n\n' + history,
5869
zip_safe=False,
59-
cmdclass=cmdclass
6070
)

0 commit comments

Comments
 (0)