|
14 | 14 | INSTALL_REQUIRES = ['decopatch', 'funcsigs;python_version<"3.3"', 'valid8', 'makefun'] |
15 | 15 | DEPENDENCY_LINKS = [] |
16 | 16 | SETUP_REQUIRES = ['pytest-runner', 'setuptools_scm', 'pypandoc', 'pandoc'] |
17 | | -TESTS_REQUIRE = ['pytest', 'pytest-logging', 'pytest-cov', 'PyContracts', 'enforce', 'pytypes', 'valid8>=2.0.0'] |
| 17 | +TESTS_REQUIRE = ['pytest', 'pytest-logging', 'PyContracts', 'enforce', 'pytypes', 'valid8>=2.0.0'] |
18 | 18 | EXTRAS_REQUIRE = {'contracts': ['PyContracts'], |
19 | 19 | 'enforce': ['enforce'], |
20 | 20 | 'validate': ['valid8']} |
|
23 | 23 | try: |
24 | 24 | from setuptools_scm import get_version |
25 | 25 | except Exception as e: |
26 | | - raise_from(Exception('Required packages for setup not found. You may wish you execute ' |
27 | | - '"pip install -r ci_tools/requirements-setup.txt" to install them or alternatively install ' |
28 | | - 'them manually using conda or other system. The list is : ' + str(SETUP_REQUIRES)), e) |
| 26 | + raise_from(Exception('Required packages for setup not found. Please install `setuptools_scm`'), e) |
29 | 27 |
|
30 | 28 | # ************** ID card ***************** |
31 | 29 | DISTNAME = 'autoclass' |
|
42 | 40 | KEYWORDS = 'auto code generator getter setter constructor autoarg autoprops decorator property properties fields ' \ |
43 | 41 | 'attribute attr contract object class enforce valid boilerplate pep484 type-hints runtime-typechecking ' \ |
44 | 42 | 'typechecking' |
45 | | -# --Get the long description from the README file |
46 | | -# with open(path.join(here, 'README.md'), encoding='utf-8') as f: |
47 | | -# LONG_DESCRIPTION = f.read() |
48 | | -try: |
49 | | - import pypandoc |
50 | | - LONG_DESCRIPTION = pypandoc.convert(path.join(here, 'docs', 'long_description.md'), 'rst').replace('\r', '') |
51 | | -except(ImportError): |
52 | | - from warnings import warn |
53 | | - warn('WARNING pypandoc could not be imported - we recommend that you install it in order to package the ' |
54 | | - 'documentation correctly') |
55 | | - LONG_DESCRIPTION = open('README.md').read() |
| 43 | + |
| 44 | +with open(path.join(here, 'docs', 'long_description.md')) as f: |
| 45 | + LONG_DESCRIPTION = f.read() |
56 | 46 |
|
57 | 47 | # ************* VERSION ************** |
58 | 48 | # --Get the Version number from VERSION file, see https://packaging.python.org/single_source_version/ option 4. |
|
65 | 55 | name=DISTNAME, |
66 | 56 | description=DESCRIPTION, |
67 | 57 | long_description=LONG_DESCRIPTION, |
| 58 | + long_description_content_type='text/markdown', |
68 | 59 |
|
69 | 60 | # Versions should comply with PEP440. For a discussion on single-sourcing |
70 | 61 | # the version across setup.py and the project code, see |
|
125 | 116 | dependency_links=DEPENDENCY_LINKS, |
126 | 117 |
|
127 | 118 | # we're using git |
128 | | - use_scm_version=True, # this provides the version + adds the date if local non-commited changes. |
| 119 | + use_scm_version={'write_to': '%s/_version.py' % DISTNAME}, # this provides the version + adds the date if local non-commited changes. |
129 | 120 | # use_scm_version={'local_scheme':'dirty-tag'}, # this provides the version + adds '+dirty' if local non-commited changes. |
130 | 121 | setup_requires=SETUP_REQUIRES, |
131 | 122 |
|
|
0 commit comments