-
Notifications
You must be signed in to change notification settings - Fork 43
/
setup.py
130 lines (120 loc) · 4.81 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
import os
import codecs
from setuptools import setup
from setuptools import Extension
from setuptools.command.build_ext import build_ext
try:
from Cython.Build import cythonize
except ImportError:
use_cython = False
ext = 'c'
else:
use_cython = True
ext = 'pyx'
try:
if not use_cython:
extensions = [Extension("fvid.fvid_cython", ["fvid/fvid_cython.c"], include_dirs=["./fvid", "fvid/"])]
else:
extensions = [Extension("fvid.fvid_cython", ["fvid/fvid_cython.pyx"], include_dirs=["./fvid", "fvid/"])]
extensions = cythonize(extensions, compiler_directives={'language_level': "3", 'infer_types': True})
except: # blanket exception until the exact exception name is found
extensions = []
with open("README.md", "r") as fh:
long_description = fh.read()
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), "r") as fp:
return fp.read()
def get_version(rel_path):
for line in read(rel_path).splitlines():
if line.startswith("__version__"):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
dynamic_version = get_version("fvid/__init__.py")
try:
setup(
name="fvid",
version=dynamic_version,
author="Alfredo Sequeida",
description="fvid is a project that aims to encode any file as a video using 1-bit color images to survive compression algorithms for data retrieval.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/AlfredoSequeida/fvid",
download_url="https://github.com/AlfredoSequeida/fvid/archive/"
+ dynamic_version
+ ".tar.gz",
keywords="fvid youtube videos files bitdum hexdump ffmpeg video file",
platforms="any",
classifiers=[
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Operating System :: Microsoft :: Windows :: Windows 10",
"Operating System :: Microsoft :: Windows :: Windows 8",
"Operating System :: Microsoft :: Windows :: Windows 8.1",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
],
license="MIT",
packages=["fvid"],
install_requires=[
"bitstring >= 3.1.6",
"pillow >= 7.2.0",
"tqdm >= 4.49.0",
"cryptography >= 3.1.1",
"pycryptodome >= 3.9.8"
],
python_requires=">=3.6",
entry_points={"console_scripts": ["fvid = fvid.fvid:main"]},
cmdclass={'build_ext': build_ext},
ext_modules=extensions,
include_package_data=True,
zip_safe=False,
)
except:
setup(
name="fvid",
version=dynamic_version,
author="Alfredo Sequeida",
description="fvid is a project that aims to encode any file as a video using 1-bit color images to survive compression algorithms for data retrieval.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/AlfredoSequeida/fvid",
download_url="https://github.com/AlfredoSequeida/fvid/archive/"
+ dynamic_version
+ ".tar.gz",
keywords="fvid youtube videos files bitdum hexdump ffmpeg video file",
platforms="any",
classifiers=[
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Operating System :: Microsoft :: Windows :: Windows 10",
"Operating System :: Microsoft :: Windows :: Windows 8",
"Operating System :: Microsoft :: Windows :: Windows 8.1",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
],
license="MIT",
packages=["fvid"],
install_requires=[
"bitstring >= 3.1.6",
"pillow >= 7.2.0",
"tqdm >= 4.49.0",
"cryptography >= 3.1.1",
"pycryptodome >= 3.9.8"
],
python_requires=">=3.6",
entry_points={"console_scripts": ["fvid = fvid.fvid:main"]},
include_package_data=True,
)