Skip to content

Commit ced14ef

Browse files
authored
Revert "Modified setup (#39)" (#40)
This reverts commit 56edd16.
1 parent 56edd16 commit ced14ef

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

pyproject.toml

Lines changed: 0 additions & 5 deletions
This file was deleted.

setup.py

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22

33
import os
4-
import setuptools
4+
from setuptools import find_packages
55

66
about = {}
77
with open(os.path.join('ExtractTable', '__version__.py'), 'r') as f:
@@ -10,8 +10,12 @@
1010
with open('README.md', 'r') as f:
1111
readme = f.read()
1212

13+
with open("requirements.txt") as fh:
14+
requires = [x.strip() for x in fh.readlines()]
1315

14-
setuptools.setup(
16+
17+
def setup_package():
18+
metadata = dict(
1519
name=about['__title__'],
1620
version=about['__version__'],
1721
description=about['__description__'],
@@ -21,8 +25,8 @@
2125
author=about['__author__'],
2226
author_email=about['__author_email__'],
2327
license=about['__license__'],
24-
packages=setuptools.find_packages(),
25-
install_requires=['requests>=2.21', 'pandas>=0.24', 'PyPDF2>=1.26'],
28+
packages=find_packages(),
29+
install_requires=requires,
2630
classifiers=[
2731
# Trove classifiers
2832
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
@@ -32,6 +36,15 @@
3236
'Programming Language :: Python :: 3.8',
3337
'Programming Language :: Python :: 3.9',
3438
'Programming Language :: Python :: 3.10'
35-
],
36-
python_requires=">=3.6",
37-
)
39+
])
40+
41+
try:
42+
from setuptools import setup
43+
except ImportError:
44+
from distutils.core import setup
45+
46+
setup(**metadata)
47+
48+
49+
if __name__ == '__main__':
50+
setup_package()

0 commit comments

Comments
 (0)