mirror of
https://github.com/kennethreitz/tablib.git
synced 2026-06-05 06:56:13 +00:00
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.
This commit is contained in:
@@ -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'],
|
||||
|
||||
Reference in New Issue
Block a user