From f6bf14afd22d8e5b706670590cc95f29d4483434 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Fri, 18 Oct 2019 15:57:13 +0200 Subject: Add project release config and cleanup project setup. (#398) * Add project release config and use Travis build stages. Refs #378. * Restructure project to use src/ and tests/ directories. * Fix testing. * Remove eggs. * More fixes. - isort and flake8 config - manifest template update - tox ini extension - docs build fixes - docs content fixes * Docs and license cleanup. --- setup.py | 37 +++++++------------------------------ 1 file changed, 7 insertions(+), 30 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 0ec9659..0bd7479 100755 --- a/setup.py +++ b/setup.py @@ -5,31 +5,9 @@ import os import re import sys -from setuptools import setup +from setuptools import find_packages, setup -if sys.argv[-1] == 'publish': - os.system("python setup.py sdist upload") - sys.exit() - - -if sys.argv[-1] == 'test': - try: - __import__('py') - except ImportError: - print('py.test required.') - sys.exit(1) - - errors = os.system('py.test test_tablib.py') - sys.exit(bool(errors)) - -packages = [ - 'tablib', 'tablib.formats', - 'tablib.packages', - 'tablib.packages.dbfpy', - 'tablib.packages.dbfpy3' -] - install = [ 'odfpy', 'openpyxl>=2.4.0', @@ -41,21 +19,21 @@ install = [ ] -with open('tablib/core.py', 'r') as fd: - version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', - fd.read(), re.MULTILINE).group(1) - setup( name='tablib', - version=version, + use_scm_version=True, + setup_requires=['setuptools_scm'], description='Format agnostic tabular data library (XLS, JSON, YAML, CSV)', long_description=(open('README.md').read() + '\n\n' + open('HISTORY.md').read()), long_description_content_type="text/markdown", author='Kenneth Reitz', author_email='me@kennethreitz.org', + maintainer='Jazzband', + maintainer_email='roadies@jazzband.co', url='https://tablib.readthedocs.io', - packages=packages, + packages=find_packages(where="src"), + package_dir={"": "src"}, license='MIT', classifiers=[ 'Development Status :: 5 - Production/Stable', @@ -71,7 +49,6 @@ setup( 'Programming Language :: Python :: 3.7', ], python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*', - tests_require=['pytest'], install_requires=install, extras_require={ 'pandas': ['pandas'], -- cgit v1.2.1