Fix #173: add MANIFEST.in with readme. Also add package data for test fixtures.

This commit is contained in:
Olivier Mangin 2018-12-04 20:36:36 -08:00
parent 41de8b5aab
commit d931b977e4
No known key found for this signature in database
GPG Key ID: D72FEC1C3120A884
2 changed files with 7 additions and 1 deletions

1
MANIFEST.in Normal file
View File

@ -0,0 +1 @@
include readme.md

View File

@ -4,6 +4,7 @@ import unittest
from setuptools import setup from setuptools import setup
with open('pubs/version.py') as f: with open('pubs/version.py') as f:
exec(f.read()) # defines __version__ exec(f.read()) # defines __version__
@ -11,11 +12,13 @@ here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'readme.md'), 'r') as fd: with open(os.path.join(here, 'readme.md'), 'r') as fd:
long_description = fd.read() long_description = fd.read()
def pubs_test_suite(): def pubs_test_suite():
test_loader = unittest.TestLoader() test_loader = unittest.TestLoader()
test_suite = test_loader.discover('tests', pattern='test_*.py') test_suite = test_loader.discover('tests', pattern='test_*.py')
return test_suite return test_suite
setup( setup(
name='pubs', name='pubs',
version=__version__, version=__version__,
@ -40,6 +43,8 @@ setup(
], ],
}, },
include_package_data=True,
install_requires=['pyyaml', 'bibtexparser>=1.0', 'python-dateutil', 'six', install_requires=['pyyaml', 'bibtexparser>=1.0', 'python-dateutil', 'six',
'requests', 'configobj', 'beautifulsoup4', 'feedparser'], 'requests', 'configobj', 'beautifulsoup4', 'feedparser'],
extras_require={'autocompletion': ['argcomplete'], extras_require={'autocompletion': ['argcomplete'],
@ -54,7 +59,7 @@ setup(
'Intended Audience :: Science/Research', 'Intended Audience :: Science/Research',
], ],
test_suite= 'tests', test_suite='tests',
tests_require=['pyfakefs>=3.4', 'mock', 'ddt'], tests_require=['pyfakefs>=3.4', 'mock', 'ddt'],
# in order to avoid 'zipimport.ZipImportError: bad local file header' # in order to avoid 'zipimport.ZipImportError: bad local file header'