forked from 0xabu/pdfannots
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
49 lines (42 loc) · 1.73 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from setuptools import setup, find_packages # type:ignore
import pathlib
def get_version_from_file(filename: pathlib.Path) -> str:
with open(filename, 'r') as fh:
for line in fh.readlines():
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
raise RuntimeError("Unable to find version string in %s" % filename)
def main() -> None:
here = pathlib.Path(__file__).parent.resolve()
setup(
name='pdfannots',
version=get_version_from_file(here / 'pdfannots' / '__init__.py'),
description='Tool to extract and pretty-print PDF annotations for reviewing',
long_description=(here / 'README.md').read_text(),
long_description_content_type='text/markdown',
url='https://github.com/0xabu/pdfannots',
author='Andrew Baumann',
classifiers=[
'Intended Audience :: Science/Research',
'Topic :: Text Processing',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
],
packages=find_packages(include=['pdfannots', 'pdfannots.*']),
package_data={'pdfannots': ['py.typed']},
entry_points={
'console_scripts': [
'pdfannots=pdfannots.cli:main',
],
},
python_requires='>=3.7',
install_requires=['pdfminer.six >= 20220319'],
)
if __name__ == '__main__':
main()