-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch opencv-python to opencv-python-headless #224
- Loading branch information
1 parent
a36f0bf
commit 9742d8d
Showing
2 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
PyMuPDF | ||
PyMuPDF>=1.19.0 | ||
python-docx>=0.8.10 | ||
fonttools>=4.24.0 | ||
numpy>=1.17.2 | ||
opencv-python>=4.5 | ||
# opencv-python-headless>=4.5 | ||
opencv-python-headless>=4.5 | ||
fire>=0.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,19 +6,18 @@ | |
DESCRIPTION = 'Open source Python library converting pdf to docx.' | ||
EXCLUDE_FROM_PACKAGES = ["build", "dist", "test"] | ||
|
||
# read version number from version.txt, otherwise alpha version | ||
# Github CI can create version.txt dynamically. | ||
|
||
def get_version(fname): | ||
'''Read version number from version.txt, created dynamically per Github Action.''' | ||
if os.path.exists(fname): | ||
with open(fname, "r", encoding="utf-8") as f: | ||
version = f.readline().strip() | ||
else: | ||
version = '0.5.6a1' | ||
|
||
return version | ||
|
||
# Load README.md for long description | ||
def load_long_description(fname): | ||
'''Load README.md for long description''' | ||
if os.path.exists(fname): | ||
with open(fname, "r", encoding="utf-8") as f: | ||
long_description = f.read() | ||
|
@@ -28,9 +27,10 @@ def load_long_description(fname): | |
return long_description | ||
|
||
def load_requirements(fname): | ||
'''Load requirements.''' | ||
try: | ||
# pip >= 10.0 | ||
from pip._internal.req import parse_requirements | ||
from pip._internal.req import parse_requirements | ||
except ImportError: | ||
# pip < 10.0 | ||
from pip.req import parse_requirements | ||
|
@@ -40,9 +40,9 @@ def load_requirements(fname): | |
requirements = [str(ir.requirement) for ir in reqs] | ||
except AttributeError: | ||
requirements = [str(ir.req) for ir in reqs] | ||
|
||
return requirements | ||
|
||
|
||
setup( | ||
name="pdf2docx", | ||
version=get_version("version.txt"), | ||
|
@@ -51,8 +51,9 @@ def load_requirements(fname): | |
long_description=load_long_description("README.md"), | ||
long_description_content_type="text/markdown", | ||
license="GPL v3", | ||
author = 'Artifex', | ||
author_email = '[email protected]', | ||
author='Artifex', | ||
author_email='[email protected]', | ||
url='https://artifex.com/', | ||
packages=find_packages(exclude=EXCLUDE_FROM_PACKAGES), | ||
include_package_data=True, | ||
zip_safe=False, | ||
|