2017-01-13 01:44:44 +03:00
|
|
|
from codecs import open
|
|
|
|
import os
|
2016-07-25 19:17:52 +03:00
|
|
|
import re
|
|
|
|
try:
|
|
|
|
from setuptools import setup
|
|
|
|
except ImportError:
|
|
|
|
from distutils.core import setup
|
2017-01-13 01:44:44 +03:00
|
|
|
import sys
|
2016-07-25 19:17:52 +03:00
|
|
|
|
2017-01-13 01:44:44 +03:00
|
|
|
if sys.argv[-1] == 'publish':
|
|
|
|
os.system('rm -rf blobxfer.egg-info/ build dist __pycache__/')
|
|
|
|
os.system('python setup.py sdist bdist_wheel')
|
|
|
|
os.unlink('README.rst')
|
|
|
|
sys.exit()
|
|
|
|
elif sys.argv[-1] == 'upload':
|
|
|
|
os.system('twine upload dist/*')
|
|
|
|
sys.exit()
|
|
|
|
elif sys.argv[-1] == 'sdist' or sys.argv[-1] == 'bdist_wheel':
|
|
|
|
import pypandoc
|
|
|
|
long_description = pypandoc.convert('README.md', 'rst')
|
|
|
|
else:
|
|
|
|
long_description = ''
|
|
|
|
|
|
|
|
with open('blobxfer/version.py', 'r', 'utf-8') as fd:
|
2016-07-25 19:17:52 +03:00
|
|
|
version = re.search(
|
2017-01-13 01:44:44 +03:00
|
|
|
r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
|
2016-07-25 19:17:52 +03:00
|
|
|
fd.read(), re.MULTILINE).group(1)
|
|
|
|
|
2017-01-13 01:44:44 +03:00
|
|
|
if not version:
|
|
|
|
raise RuntimeError('Cannot find version')
|
|
|
|
|
|
|
|
packages = [
|
|
|
|
'blobxfer',
|
|
|
|
'blobxfer.blob',
|
|
|
|
'blobxfer.blob.block',
|
|
|
|
'blobxfer_cli',
|
|
|
|
]
|
|
|
|
|
|
|
|
install_requires = [
|
|
|
|
'azure-common==1.1.4',
|
|
|
|
'azure-storage==0.33.0',
|
|
|
|
'click==6.6',
|
|
|
|
'cryptography>=1.7.1',
|
|
|
|
'future==0.16.0',
|
|
|
|
'ruamel.yaml==0.13.11',
|
|
|
|
]
|
|
|
|
|
|
|
|
if sys.version_info < (3, 5):
|
|
|
|
install_requires.append('pathlib2')
|
|
|
|
install_requires.append('scandir')
|
2016-07-25 19:17:52 +03:00
|
|
|
|
|
|
|
setup(
|
|
|
|
name='blobxfer',
|
|
|
|
version=version,
|
|
|
|
author='Microsoft Corporation, Azure Batch and HPC Team',
|
|
|
|
author_email='',
|
2017-01-13 01:44:44 +03:00
|
|
|
description=(
|
|
|
|
'Azure storage transfer tool and library with AzCopy-like features'),
|
2016-07-25 19:17:52 +03:00
|
|
|
long_description=long_description,
|
|
|
|
platforms='any',
|
2016-07-28 22:52:25 +03:00
|
|
|
url='https://github.com/Azure/blobxfer',
|
2016-07-25 19:17:52 +03:00
|
|
|
license='MIT',
|
2017-01-13 01:44:44 +03:00
|
|
|
packages=packages,
|
|
|
|
package_data={'blobxfer': ['LICENSE']},
|
|
|
|
package_dir={'blobxfer': 'blobxfer', 'blobxfer_cli': 'cli'},
|
2016-07-25 19:17:52 +03:00
|
|
|
entry_points={
|
2017-01-13 01:44:44 +03:00
|
|
|
'console_scripts': 'blobxfer=blobxfer_cli.cli:cli',
|
2016-07-25 19:17:52 +03:00
|
|
|
},
|
2017-01-13 01:44:44 +03:00
|
|
|
zip_safe=False,
|
|
|
|
install_requires=install_requires,
|
2016-07-25 19:17:52 +03:00
|
|
|
tests_require=['pytest'],
|
|
|
|
classifiers=[
|
2017-01-13 01:44:44 +03:00
|
|
|
'Development Status :: 3 - Alpha',
|
2016-07-25 19:17:52 +03:00
|
|
|
'Environment :: Console',
|
|
|
|
'Intended Audience :: Developers',
|
|
|
|
'Intended Audience :: System Administrators',
|
|
|
|
'License :: OSI Approved :: MIT License',
|
|
|
|
'Operating System :: OS Independent',
|
|
|
|
'Programming Language :: Python :: 2',
|
|
|
|
'Programming Language :: Python :: 2.7',
|
|
|
|
'Programming Language :: Python :: 3',
|
|
|
|
'Programming Language :: Python :: 3.3',
|
|
|
|
'Programming Language :: Python :: 3.4',
|
|
|
|
'Programming Language :: Python :: 3.5',
|
2017-01-13 01:44:44 +03:00
|
|
|
'Programming Language :: Python :: 3.6',
|
2016-07-25 19:17:52 +03:00
|
|
|
'Topic :: Utilities',
|
|
|
|
],
|
2017-01-13 01:44:44 +03:00
|
|
|
keywords='azcopy azure storage blob files transfer copy smb cifs',
|
2016-07-25 19:17:52 +03:00
|
|
|
)
|