Moved most of metadata into setup.cfg
parent
f7b94b3e57
commit
83cd23825f
|
|
@ -13,11 +13,4 @@ def generate_version(version, prerelease=None, revision=None):
|
||||||
version_parts.append(".{}".format(revision))
|
version_parts.append(".{}".format(revision))
|
||||||
return "".join(version_parts)
|
return "".join(version_parts)
|
||||||
|
|
||||||
|
|
||||||
__title__ = "camelot-py"
|
|
||||||
__description__ = "PDF Table Extraction for Humans."
|
|
||||||
__url__ = "http://camelot-py.readthedocs.io/"
|
|
||||||
__version__ = generate_version(VERSION, prerelease=PRERELEASE, revision=REVISION)
|
__version__ = generate_version(VERSION, prerelease=PRERELEASE, revision=REVISION)
|
||||||
__author__ = "Vinayak Mehta"
|
|
||||||
__author_email__ = "vmehta94@gmail.com"
|
|
||||||
__license__ = "MIT License"
|
|
||||||
|
|
|
||||||
52
setup.cfg
52
setup.cfg
|
|
@ -1,3 +1,55 @@
|
||||||
|
[metadata]
|
||||||
|
name = camelot-py
|
||||||
|
version = attr: __version__
|
||||||
|
description = PDF Table Extraction for Humans.
|
||||||
|
url = https://camelot-py.readthedocs.io/
|
||||||
|
author = Vinayak Mehta
|
||||||
|
author_email = vmehta94@gmail.com
|
||||||
|
license = MIT
|
||||||
|
long_description = file: README.md
|
||||||
|
long_description_content_type = text/markdown
|
||||||
|
classifiers =
|
||||||
|
License :: OSI Approved :: MIT License
|
||||||
|
Programming Language :: Python :: 2.7
|
||||||
|
Programming Language :: Python :: 3.5
|
||||||
|
Programming Language :: Python :: 3.6
|
||||||
|
Programming Language :: Python :: 3.7
|
||||||
|
|
||||||
|
[options]
|
||||||
|
packages = find:
|
||||||
|
install_requires =
|
||||||
|
chardet>=3.0.4
|
||||||
|
click>=6.7
|
||||||
|
numpy>=1.13.3
|
||||||
|
openpyxl>=2.5.8
|
||||||
|
pandas>=0.23.4
|
||||||
|
pdfminer.six>=20170720
|
||||||
|
PyPDF2>=1.26.0
|
||||||
|
|
||||||
|
[options.packages.find]
|
||||||
|
exclude =
|
||||||
|
tests
|
||||||
|
|
||||||
|
[options.entry_points]
|
||||||
|
console_scripts = camelot = camelot.cli:cli
|
||||||
|
|
||||||
|
[options.extras_require]
|
||||||
|
cv = opencv-python>=3.4.2.17
|
||||||
|
all =
|
||||||
|
opencv-python>=3.4.2.17
|
||||||
|
matplotlib>=2.2.3
|
||||||
|
dev =
|
||||||
|
codecov>=2.0.15
|
||||||
|
pytest>=3.8.0
|
||||||
|
pytest-cov>=2.6.0
|
||||||
|
pytest-mpl>=0.10
|
||||||
|
pytest-runner>=4.2
|
||||||
|
Sphinx>=1.7.9
|
||||||
|
opencv-python>=3.4.2.17
|
||||||
|
matplotlib>=2.2.3
|
||||||
|
plot = matplotlib>=2.2.3
|
||||||
|
|
||||||
|
|
||||||
[aliases]
|
[aliases]
|
||||||
test=pytest
|
test=pytest
|
||||||
|
|
||||||
|
|
|
||||||
59
setup.py
59
setup.py
|
|
@ -1,7 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
from setuptools import setup
|
||||||
import os
|
import os
|
||||||
from setuptools import find_packages
|
|
||||||
|
|
||||||
|
|
||||||
here = os.path.abspath(os.path.dirname(__file__))
|
here = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
@ -9,19 +8,7 @@ about = {}
|
||||||
with open(os.path.join(here, 'camelot', '__version__.py'), 'r') as f:
|
with open(os.path.join(here, 'camelot', '__version__.py'), 'r') as f:
|
||||||
exec(f.read(), about)
|
exec(f.read(), about)
|
||||||
|
|
||||||
with open('README.md', 'r') as f:
|
__version__ = about["__version__"]
|
||||||
readme = f.read()
|
|
||||||
|
|
||||||
|
|
||||||
requires = [
|
|
||||||
'chardet>=3.0.4',
|
|
||||||
'click>=6.7',
|
|
||||||
'numpy>=1.13.3',
|
|
||||||
'openpyxl>=2.5.8',
|
|
||||||
'pandas>=0.23.4',
|
|
||||||
'pdfminer.six>=20170720',
|
|
||||||
'PyPDF2>=1.26.0'
|
|
||||||
]
|
|
||||||
|
|
||||||
cv_requires = [
|
cv_requires = [
|
||||||
'opencv-python>=3.4.2.17'
|
'opencv-python>=3.4.2.17'
|
||||||
|
|
@ -43,47 +30,13 @@ dev_requires = [
|
||||||
all_requires = cv_requires + plot_requires
|
all_requires = cv_requires + plot_requires
|
||||||
dev_requires = dev_requires + all_requires
|
dev_requires = dev_requires + all_requires
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
def setup_package():
|
setup(
|
||||||
metadata = dict(name=about['__title__'],
|
|
||||||
version=about['__version__'],
|
|
||||||
description=about['__description__'],
|
|
||||||
long_description=readme,
|
|
||||||
long_description_content_type="text/markdown",
|
|
||||||
url=about['__url__'],
|
|
||||||
author=about['__author__'],
|
|
||||||
author_email=about['__author_email__'],
|
|
||||||
license=about['__license__'],
|
|
||||||
packages=find_packages(exclude=('tests',)),
|
|
||||||
install_requires=requires,
|
|
||||||
extras_require={
|
extras_require={
|
||||||
'all': all_requires,
|
'all': all_requires,
|
||||||
'cv': cv_requires,
|
'cv': cv_requires,
|
||||||
'dev': dev_requires,
|
'dev': dev_requires,
|
||||||
'plot': plot_requires
|
'plot': plot_requires
|
||||||
},
|
},
|
||||||
entry_points={
|
use_scm_version=True
|
||||||
'console_scripts': [
|
)
|
||||||
'camelot = camelot.cli:cli',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
classifiers=[
|
|
||||||
# Trove classifiers
|
|
||||||
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
|
||||||
'License :: OSI Approved :: MIT License',
|
|
||||||
'Programming Language :: Python :: 2.7',
|
|
||||||
'Programming Language :: Python :: 3.5',
|
|
||||||
'Programming Language :: Python :: 3.6',
|
|
||||||
'Programming Language :: Python :: 3.7'
|
|
||||||
])
|
|
||||||
|
|
||||||
try:
|
|
||||||
from setuptools import setup
|
|
||||||
except ImportError:
|
|
||||||
from distutils.core import setup
|
|
||||||
|
|
||||||
setup(**metadata)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
setup_package()
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue