|
1 | 1 | #!/usr/bin/env python |
2 | 2 | # -*- encoding: utf8 -*- |
3 | 3 | import glob |
| 4 | +import inspect |
4 | 5 | import io |
5 | | -from os.path import basename |
6 | | -from os.path import dirname |
7 | | -from os.path import join |
8 | | -from os.path import splitext |
| 6 | +import os |
9 | 7 |
|
10 | 8 | from setuptools import find_packages |
11 | 9 | from setuptools import setup |
12 | 10 |
|
13 | 11 |
|
| 12 | +changelog = os.path.join(os.path.dirname(os.path.abspath( |
| 13 | + inspect.getfile(inspect.currentframe()))), "CHANGELOG.md") |
| 14 | +with open(changelog, "rt") as fh: |
| 15 | + changelog = fh.read() |
| 16 | + |
| 17 | +long_description = """ |
| 18 | +Source code: https://github.com/krischer/pyflex |
| 19 | +
|
| 20 | +Documentation: http://krischer.github.io/pyflex |
| 21 | +
|
| 22 | +%s""".strip() % changelog |
| 23 | + |
| 24 | + |
14 | 25 | def read(*names, **kwargs): |
15 | 26 | return io.open( |
16 | | - join(dirname(__file__), *names), |
| 27 | + os.path.join(os.path.dirname(__file__), *names), |
17 | 28 | encoding=kwargs.get("encoding", "utf8")).read() |
18 | 29 |
|
19 | 30 | setup( |
20 | 31 | name="pyflex", |
21 | 32 | version="0.1.2", |
22 | 33 | license='GNU General Public License, Version 3 (GPLv3)', |
23 | 34 | description="Python port of the FLEXWIN package", |
| 35 | + long_description=long_description, |
24 | 36 | author="Lion Krischer", |
25 | 37 | author_email="krischer@geophysik.uni-muenchen.de", |
26 | 38 | url="https://github.com/krischer/pyflex", |
27 | 39 | packages=find_packages("src"), |
28 | 40 | package_dir={"": "src"}, |
29 | | - py_modules=[splitext(basename(i))[0] for i in glob.glob("src/*.py")], |
| 41 | + py_modules=[os.path.splitext(os.path.basename(i))[0] |
| 42 | + for i in glob.glob("src/*.py")], |
30 | 43 | include_package_data=True, |
31 | 44 | zip_safe=False, |
32 | 45 | classifiers=[ |
|
0 commit comments