2021-02-26 23:08:13 +05:30
|
|
|
import os
|
|
|
|
|
|
2015-08-23 23:12:56 -04:00
|
|
|
from setuptools import setup, find_packages
|
|
|
|
|
|
2017-02-25 13:23:51 -05:00
|
|
|
NAME = "pdfplumber"
|
|
|
|
|
HERE = os.path.abspath(os.path.dirname(__file__))
|
2020-07-19 10:35:09 -04:00
|
|
|
|
2017-02-25 13:23:51 -05:00
|
|
|
version_ns = {}
|
2020-11-12 22:16:54 -05:00
|
|
|
|
2021-02-26 23:08:13 +05:30
|
|
|
|
2020-11-12 22:16:54 -05:00
|
|
|
def _open(subpath):
|
|
|
|
|
path = os.path.join(HERE, subpath)
|
|
|
|
|
return open(path, encoding="utf-8")
|
|
|
|
|
|
2021-02-26 23:08:13 +05:30
|
|
|
|
|
|
|
|
with _open(NAME + "/_version.py") as f:
|
2017-02-25 13:23:51 -05:00
|
|
|
exec(f.read(), {}, version_ns)
|
2016-03-06 19:49:59 -05:00
|
|
|
|
2020-11-12 22:16:54 -05:00
|
|
|
with _open("requirements.txt") as f:
|
2020-07-19 10:35:09 -04:00
|
|
|
base_reqs = f.read().strip().split("\n")
|
|
|
|
|
|
2020-11-12 22:16:54 -05:00
|
|
|
with _open("requirements-dev.txt") as f:
|
2020-07-19 10:35:09 -04:00
|
|
|
dev_reqs = f.read().strip().split("\n")
|
2015-08-23 23:12:56 -04:00
|
|
|
|
2020-11-12 22:16:54 -05:00
|
|
|
with _open("README.md") as f:
|
2020-07-19 10:36:28 -04:00
|
|
|
long_description = f.read()
|
|
|
|
|
|
2015-08-23 23:12:56 -04:00
|
|
|
setup(
|
2017-02-25 13:23:51 -05:00
|
|
|
name=NAME,
|
2020-11-12 22:32:58 -05:00
|
|
|
url="https://github.com/jsvine/pdfplumber",
|
|
|
|
|
author="Jeremy Singer-Vine",
|
|
|
|
|
author_email="jsvine@gmail.com",
|
2017-02-25 13:23:51 -05:00
|
|
|
description="Plumb a PDF for detailed information about each char, rectangle, and line.",
|
2021-02-26 23:08:13 +05:30
|
|
|
long_description=long_description,
|
|
|
|
|
long_description_content_type="text/markdown",
|
|
|
|
|
version=version_ns["__version__"],
|
|
|
|
|
packages=find_packages(
|
|
|
|
|
exclude=[
|
|
|
|
|
"test",
|
|
|
|
|
]
|
|
|
|
|
),
|
2022-08-05 18:08:33 -03:00
|
|
|
include_package_data=True,
|
|
|
|
|
package_data={"pdfplumber": ["py.typed"]},
|
|
|
|
|
zip_safe=False,
|
2021-02-26 23:08:13 +05:30
|
|
|
tests_require=base_reqs + dev_reqs,
|
2023-07-16 18:22:58 -04:00
|
|
|
python_requires=">=3.8",
|
2021-02-26 23:08:13 +05:30
|
|
|
install_requires=base_reqs,
|
|
|
|
|
entry_points={"console_scripts": ["pdfplumber = pdfplumber.cli:main"]},
|
2020-07-25 10:41:33 -04:00
|
|
|
classifiers=[
|
|
|
|
|
"Intended Audience :: Developers",
|
|
|
|
|
"License :: OSI Approved :: MIT License",
|
|
|
|
|
"Operating System :: OS Independent",
|
2022-04-23 16:49:26 -04:00
|
|
|
"Programming Language :: Python :: 3.9",
|
|
|
|
|
"Programming Language :: Python :: 3.10",
|
2023-07-16 15:40:52 -04:00
|
|
|
"Programming Language :: Python :: 3.11",
|
2024-07-06 16:18:51 -04:00
|
|
|
"Programming Language :: Python :: 3.12",
|
2020-07-25 10:41:33 -04:00
|
|
|
],
|
2015-08-23 23:12:56 -04:00
|
|
|
)
|