-
Notifications
You must be signed in to change notification settings - Fork 11
/
setup.py
85 lines (74 loc) · 2.51 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
from os import path
from setuptools import setup
supported_versions = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
optional_requirements = {"go": 'tdewolff-minify>=2.20.34; platform_system == "Linux"'}
basedir = path.abspath(path.dirname(__file__))
long_description = ""
requirements = []
test_requirements = []
requirements_path = path.join(basedir, "requirements")
with open(path.join(basedir, path.join("flask_minify", "about.py"))) as f:
exec(f.read()) # nosec
with open(path.join(basedir, "README.md")) as f:
long_description += f.read()
if path.isdir(requirements_path):
with open(path.join(requirements_path, "main.txt")) as f:
requirements += [
line for line in f.read().split("\n") if line and "[go]" not in line
]
test_requirements += requirements
with open(path.join(requirements_path, "test.txt")) as f:
test_requirements += [
line for line in f.read().split("\n") if line and not line.startswith("-r")
]
else:
requires_path = path.join(
path.join(basedir, "Flask_Minify.egg-info"), "requires.txt"
)
with open(requires_path) as f:
requirements += [line for line in f.read().split("\n") if line]
supported_python_classifiers = [
"Programming Language :: Python :: {0}".format(v) for v in supported_versions
]
setup(
name="Flask-Minify",
version=__version__,
url="https://github.com/mrf345/flask_minify/",
download_url="https://github.com/mrf345/flask_minify/archive/%s.tar.gz"
% __version__,
license=__license__,
author=__author__,
author_email=__email__,
description=__doc__,
long_description=long_description,
long_description_content_type="text/markdown",
packages=["flask_minify"],
zip_safe=False,
include_package_data=True,
platforms="any",
install_requires=requirements,
setup_requires=requirements,
extras_require=optional_requirements,
keywords=[
"flask",
"extension",
"minifer",
"htmlmin",
"lesscpy",
"jsmin",
"html",
"js",
"less",
"css",
],
classifiers=[
*supported_python_classifiers,
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Python Modules",
],
)