-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathsetup.py
More file actions
70 lines (64 loc) · 2.31 KB
/
Copy pathsetup.py
File metadata and controls
70 lines (64 loc) · 2.31 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
59
60
61
62
63
64
65
66
67
68
69
70
# -*- coding: utf-8 -*-
# Author: Nianze A. TAO
"""
set up the application
"""
import os
import re
from pathlib import Path
from shutil import rmtree
from setuptools import setup
init_file = Path("pypdfeditor_core") / "__init__.py"
with open(init_file, mode="r", encoding="utf-8") as fh:
lines = fh.readlines()
for line in lines:
if "__version__" in line:
version = re.findall(r"[0-9]+\.[0-9]+\.[0-9]+", line)
if len(version) != 0:
version = version[0]
print("version:", version)
break
with open("README.md", mode="r", encoding="utf-8") as f:
long_description = f.read()
long_description = long_description.replace(
'## Screenshot 🎞️\n\non Windows 11:\n\n<img src="./screenshots/tab2.png" width="400" alt="tab2 win11"/>',
"",
)
setup(
name="pyPDFeditor-GUI",
version=version,
description="A desktop application to edit PDF files",
long_description=long_description,
long_description_content_type="text/markdown",
author="Nianze A. TAO",
author_email="Augus_1999@outlook.com",
packages=["pypdfeditor_core", "pypdfeditor_core.icons"],
package_dir={
"pypdfeditor_core": "pypdfeditor_core",
"pypdfeditor_core.icons": "pypdfeditor_core/icons",
},
license="MIT",
python_requires=">=3.10",
install_requires=["PyMuPDF>=1.26.5,<1.28.0", "PyQt6>=6.7.0"],
url="https://github.com/Augus1999/pyPDFeditor-GUI/",
project_urls={"Source": "https://github.com/Augus1999/pyPDFeditor-GUI"},
include_package_data=True,
package_data={"pypdfeditor_core": ["icons/*.svg", "icons/*.py"]},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: End Users/Desktop",
"Natural Language :: Chinese (Traditional)",
"Natural Language :: English",
"Natural Language :: Japanese",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Topic :: Office/Business",
],
entry_points={"gui_scripts": ["pdfeditor=pypdfeditor_core:main"]},
)
if os.path.exists("build"):
rmtree("build")
if os.path.exists("pyPDFeditor_GUI.egg-info"):
rmtree("pyPDFeditor_GUI.egg-info") # remove egg-info dir