-
Notifications
You must be signed in to change notification settings - Fork 15
/
setup.py
63 lines (53 loc) · 1.82 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
from setuptools import setup
from setuptools.command.develop import develop
from setuptools.command.install import install
def run_compile_catalog(setuptools_command):
from babel.messages.frontend import compile_catalog
compiler = compile_catalog(setuptools_command.distribution)
option_dict = setuptools_command.distribution.get_option_dict("compile_catalog")
compiler.domain = [option_dict["domain"][1]]
compiler.directory = option_dict["directory"][1]
compiler.use_fuzzy = option_dict["use_fuzzy"][1]
compiler.run()
# From https://stackoverflow.com/questions/40051076/compile-translation-files-when-calling-setup-py-install
class InstallWithCompile(install):
def run(self):
run_compile_catalog(self)
super().run()
class DevelopWithCompile(develop):
def run(self):
run_compile_catalog(self)
super().run()
install_requires = [
"jsonref",
"schema",
"openpyxl>=2.6,!=3.0.2",
"pytz",
"xmltodict",
"lxml",
"odfpy",
"backports-datetime-fromisoformat;platform_python_implementation!='PyPy'",
"zodb",
"zc.zlibstorage",
"ijson",
]
setup(
name="flattentool",
version="0.26.0",
author="Open Data Services",
author_email="[email protected]",
packages=["flattentool"],
scripts=["flatten-tool"],
url="https://github.com/OpenDataServices/flatten-tool",
license="MIT",
description="Tools for generating CSV and other flat versions of the structured data",
install_requires=install_requires,
extras_require={"HTTP": ["requests"], "geo": ["shapely", "geojson"]},
cmdclass={
"install": InstallWithCompile,
"develop": DevelopWithCompile,
},
package_data={"flattentool": ["locale/*/*/*.mo", "locale/*/*/*.po"]},
setup_requires=["babel"],
python_requires=">=3.9.0",
)