-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
58 lines (53 loc) · 1.69 KB
/
setup.py
File metadata and controls
58 lines (53 loc) · 1.69 KB
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
50
51
52
53
54
55
56
57
58
import re
from setuptools import setup, find_packages
BASE_REQUIREMENTS = [
"PyPDF2>=3.0.0",
"Pillow>=9.0.0",
"pypdfium2>=4.0.0",
"python-docx>=0.8.11",
"PyGitHub>=1.55.0",
"python-gnupg>=0.4.8",
"tkinterdnd2>=0.3.0",
]
EXTRAS_REQUIRE = {
"ocr": ["pytesseract>=0.3.10"],
}
EXTRAS_REQUIRE["full"] = sorted({dep for deps in EXTRAS_REQUIRE.values() for dep in deps})
# Read version from SafePDF/__init__.py
with open("SafePDF/__init__.py", "r", encoding="utf-8") as f:
content = f.read()
match = re.search(r'__version__\s*=\s*["\']([^"\']+)["\']', content)
version = match.group(1) if match else "0.0.1"
with open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()
setup(
name="SafePDF",
version=version,
author="Mehmet Cagri Aksoy",
author_email="info@safepdf.de",
description="A safe PDF manipulation tool",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/mcagriaksoy/safepdf",
packages=find_packages(),
include_package_data=True,
package_data={
"SafePDF": ["text/**/*", "version.txt"],
},
install_requires=BASE_REQUIREMENTS,
extras_require=EXTRAS_REQUIRE,
entry_points={
"console_scripts": [
"safepdf=SafePDF.safe_pdf_app:main",
],
},
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.14",
],
python_requires=">=3.8",
)