|
3 | 3 |
|
4 | 4 | from setuptools import setup |
5 | 5 |
|
| 6 | +from flopymetascript import __version__, __name__, __author__ |
| 7 | + |
6 | 8 | if sys.version_info[0] != 3 or sys.version_info[1] < 4: |
7 | 9 | print(""" |
8 | 10 | This script requires Python version 3.4. |
|
13 | 15 | """) |
14 | 16 | sys.exit(1) |
15 | 17 |
|
| 18 | +try: |
| 19 | + import pypandoc |
| 20 | + |
| 21 | + long_description = pypandoc.convert('README.md', 'rst') |
| 22 | + long_description = long_description.replace("\r", "") |
| 23 | + |
| 24 | +except OSError as e: |
| 25 | + import io |
| 26 | + |
| 27 | + # pandoc is not installed, fallback to using raw contents |
| 28 | + with io.open('README.md', encoding="utf-8") as f: |
| 29 | + long_description = f.read() |
| 30 | + |
16 | 31 | setup( |
17 | | - name='flopymetascript', |
| 32 | + name=__name__, |
18 | 33 | description= |
19 | 34 | 'Converts a zip with MODFLOW input files to a zip containing Flopy script', |
20 | | - version='0.2.0', |
| 35 | + long_description=long_description, |
| 36 | + version=__version__, |
21 | 37 | packages=['flopymetascript'], |
22 | 38 | license='MIT', |
23 | | - author='Bas des Tombe', |
| 39 | + author=__author__, |
24 | 40 | author_email='bdestombe@gmail.com', |
25 | 41 | url='https://github.com/bdestombe/flopymetascript', |
26 | | - install_requires=['numpy>=1.12', 'nbformat>=4.3', 'nbconvert>=5.1', 'flopy>=3.2', 'yapf'], |
| 42 | + download_url= |
| 43 | + 'https://github.com/bdestombe/flopymetascript/archive/0.2.0.tar.gz', |
| 44 | + keywords=['flopy', 'groundwater', 'hydrology'], |
| 45 | + install_requires=[ |
| 46 | + 'numpy>=1.12', 'nbformat>=4.3', 'nbconvert>=5.1', 'flopy>=3.2', 'yapf' |
| 47 | + ], |
| 48 | + platforms='Windows, Mac OS-X', |
| 49 | + classifiers=[ |
| 50 | + "Development Status :: 4 - Beta", |
| 51 | + "Topic :: Scientific/Engineering", |
| 52 | + "Programming Language :: Python :: 3 :: Only", |
| 53 | + "License :: OSI Approved :: BSD License", |
| 54 | + "Natural Language :: English", |
| 55 | + "License :: OSI Approved :: MIT License", |
| 56 | + ], |
27 | 57 | entry_points={ |
28 | 58 | "console_scripts": |
29 | 59 | ['flopymetascript = flopymetascript.flopymetascript:main'] |
|
0 commit comments