|
| 1 | +# Always prefer setuptools over distutils |
| 2 | +from setuptools import setup, find_packages |
| 3 | + |
1 | 4 | try: |
2 | | - from setuptools import setup |
3 | | -except ImportError: |
4 | | - from distutils.core import setup |
5 | | - |
6 | | -config = { |
7 | | - 'description': 'Screeps API', |
8 | | - 'author': 'dzhu, tedivm', |
9 | | - 'url': 'https://github.com/screepers/screeps-api', |
10 | | - 'download_url': 'https://github.com/screepers/screeps-api/releases', |
11 | | - 'author_email': 'tedivm@tedivm.com', |
12 | | - 'version': '0.2', |
13 | | - 'install_requires': [ |
14 | | - 'nose', |
15 | | - 'requires', |
16 | | - 'requests>=2.10.0,<3', |
17 | | - 'websocket-client' |
18 | | - ], |
19 | | - 'packages': ['screepsapi'], |
20 | | - 'scripts': [], |
21 | | - 'name': 'screepsapi' |
22 | | -} |
23 | | - |
24 | | -setup(**config) |
| 5 | + import pypandoc |
| 6 | + long_description = pypandoc.convert('README.md', 'rst') |
| 7 | +except(IOError, ImportError): |
| 8 | + long_description = open('README.md').read() |
| 9 | + |
| 10 | + |
| 11 | +version = '0.3.0' |
| 12 | +setup( |
| 13 | + name = 'screepsapi', |
| 14 | + version = version, |
| 15 | + packages=find_packages(), |
| 16 | + |
| 17 | + description = 'Screeps Unofficial Client for the Unofficial API', |
| 18 | + long_description=long_description, |
| 19 | + python_requires='>=2', |
| 20 | + |
| 21 | + author = 'Robert Hafner, dzhu', |
| 22 | + author_email = 'tedivm@tedivm.com', |
| 23 | + url = 'https://github.com/screepers/screeps-api', |
| 24 | + download_url = "https://github.com/screepers/screeps-api/archive/v%s.tar.gz" % (version), |
| 25 | + keywords = 'screeps api', |
| 26 | + |
| 27 | + classifiers = [ |
| 28 | + 'Development Status :: 4 - Beta', |
| 29 | + 'License :: OSI Approved :: MIT License', |
| 30 | + 'Intended Audience :: Developers', |
| 31 | + 'Programming Language :: Python :: 3', |
| 32 | + 'Programming Language :: Python :: 2', |
| 33 | + ], |
| 34 | + |
| 35 | + install_requires=[ |
| 36 | + 'nose', |
| 37 | + 'requires', |
| 38 | + 'requests>=2.10.0,<3', |
| 39 | + 'websocket-client' |
| 40 | + ], |
| 41 | + |
| 42 | + extras_require={ |
| 43 | + 'dev': [ |
| 44 | + 'pypandoc', |
| 45 | + 'twine', |
| 46 | + 'wheel' |
| 47 | + ], |
| 48 | + }, |
| 49 | + |
| 50 | +) |
0 commit comments