|
1 | | -import os |
2 | | -import setuptools |
| 1 | +""" |
| 2 | +Setup script |
| 3 | +
|
| 4 | +Usage : |
| 5 | + python setup.py build |
| 6 | + python setup.py install |
3 | 7 |
|
4 | | -SETUPDIR = os.path.dirname(__file__) |
5 | | -PKGDIR = os.path.join(SETUPDIR, 'src') |
| 8 | +For repository admin: |
| 9 | + python setup.py publish |
6 | 10 |
|
7 | | -with open(os.path.join(SETUPDIR, 'README.md'), 'r') as f: |
8 | | - long_description = f.read() |
| 11 | +For testing: |
| 12 | + test.sh |
| 13 | +""" |
| 14 | +import os |
| 15 | +import sys |
| 16 | +from setuptools import setup, find_packages |
9 | 17 |
|
| 18 | +# 'setup.py publish' shortcut. |
| 19 | +if sys.argv[-1] == 'publish': |
| 20 | + # see https://twine.readthedocs.io/en/latest/ |
| 21 | + os.system('%s %s sdist bdist_wheel' % (sys.executable, sys.argv[0])) |
| 22 | + os.system('twine upload dist/*') |
| 23 | + sys.exit() |
10 | 24 |
|
11 | | -setuptools.setup( |
12 | | - name='nextcloud', |
13 | | - version='0.0.2', |
14 | | - author='EnterpriseyIntranet', |
15 | | - description="Python wrapper for NextCloud api", |
16 | | - long_description=long_description, |
17 | | - long_description_content_type="text/markdown", |
18 | | - url="https://github.com/EnterpriseyIntranet/nextcloud-API", |
19 | | - packages=setuptools.find_packages(PKGDIR), |
20 | | - include_package_data=True, |
21 | | - install_requires=[ |
22 | | - 'requests >= 2.0.1', |
23 | | - 'six' |
24 | | - ], |
25 | | - package_dir={'': 'src'}, |
26 | | - classifiers=[ |
27 | | - 'Programming Language :: Python', |
28 | | - 'Programming Language :: Python :: 2', |
29 | | - 'Programming Language :: Python :: 3', |
30 | | - 'Development Status :: 4 - Beta', |
31 | | - 'Environment :: Web Environment', |
32 | | - 'Intended Audience :: Developers', |
33 | | - 'Topic :: Internet :: WWW/HTTP', |
34 | | - 'Topic :: Software Development :: Libraries :: Python Modules', |
35 | | - 'License :: OSI Approved :: GNU General Public License (GPL)', |
36 | | - "Operating System :: OS Independent", |
37 | | - ], |
| 25 | +setup( |
| 26 | + # see setup.cfg |
| 27 | + # some variables are defined here for retro compat with setuptools >= 33 |
| 28 | + package_dir = {'': 'src'}, |
| 29 | + packages=find_packages(where=r'./src'), |
| 30 | + long_description_content_type = 'text/markdown' |
38 | 31 | ) |
0 commit comments