Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] Moved the metadata into setup.cfg #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions excalibur/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,4 @@ def generate_version(version, prerelease=None, revision=None):
return ''.join(version_parts)


__title__ = 'excalibur-py'
__description__ = 'A web interface to extract tabular data from PDFs.'
__url__ = 'https://excalibur-py.readthedocs.io/'
__version__ = '.'.join(map(str, VERSION))
__author__ = 'Vinayak Mehta'
__author_email__ = '[email protected]'
__license__ = 'MIT License'
52 changes: 52 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,55 @@
[metadata]
name = excalibur-py
version = attr: version
author = Vinayak Mehta
author_email = [email protected]
license = MIT
description = A web interface to extract tabular data from PDFs.
url = https://excalibur-py.readthedocs.io/
long_description = file: README.md
long_description_content_type = text/markdown
classifiers =
License :: OSI Approved :: MIT License
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7

[options]
packages = find:
install_requires =
camelot-py[cv]>=0.7.1
celery>=4.1.1
Click>=7.0
configparser>=3.5.0, <3.6.0
Flask>=1.0.2
SQLAlchemy>=1.2.12
include_package_data = True

[options.packages.find]
exclude =
tests

[options.entry_points]
console_scripts = excalibur = excalibur.cli:cli

[options.extras_require]
all =
camelot-py[cv]>=0.7.1
celery>=4.1.1
Click>=7.0
configparser>=3.5.0, <3.6.0
Flask>=1.0.2
SQLAlchemy>=1.2.12
mysqlclient>=1.3.6
mysql = mysqlclient>=1.3.6
dev =
codecov>=2.0.15
pytest>=3.8.0
pytest-cov>=2.6.0
pytest-runner>=4.2
Sphinx>=1.8.1


[aliases]
test=pytest

Expand Down
78 changes: 8 additions & 70 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,75 +1,13 @@
# -*- coding: utf-8 -*-

import os
from setuptools import find_packages
from setuptools import find_packages, setup

if __name__ == "__main__":
here = os.path.abspath(os.path.dirname(__file__))
about = {}
with open(os.path.join(here, 'excalibur', '__version__.py'), 'r') as f:
exec(f.read(), about)
__version__ = about['__version__']

here = os.path.abspath(os.path.dirname(__file__))
about = {}
with open(os.path.join(here, 'excalibur', '__version__.py'), 'r') as f:
exec(f.read(), about)

with open('README.md', 'r') as f:
readme = f.read()

requires = [
'camelot-py[cv]>=0.7.1',
'celery>=4.1.1',
'Click>=7.0',
'configparser>=3.5.0, <3.6.0',
'Flask>=1.0.2',
'SQLAlchemy>=1.2.12'
]
mysql = ['mysqlclient>=1.3.6']
all_requires = requires + mysql
dev_requires = [
'codecov>=2.0.15',
'pytest>=3.8.0',
'pytest-cov>=2.6.0',
'pytest-runner>=4.2',
'Sphinx>=1.8.1'
]


def setup_package():
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',)),
include_package_data=True,
install_requires=requires,
extras_require={
'all': all_requires,
'mysql': mysql,
'dev': dev_requires
},
entry_points={
'console_scripts': [
'excalibur = excalibur.cli:cli',
],
},
classifiers=[
# Trove classifiers
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
'License :: OSI Approved :: MIT License',
'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()
setup(use_scm_version=True)