-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
68 lines (58 loc) · 1.71 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
# -*- coding: utf-8 -*-
import pathlib
import subprocess
import sys
from setuptools import setup
root_dir = pathlib.Path(__file__).parent
def read(*names, **kwargs):
with open(root_dir.joinpath(*names), "r") as fh:
return fh.read()
print("Installing a fork of pywikiapi")
subprocess.run(
[
sys.executable,
"-m",
"pip",
"install",
[
line.strip()
for line in read("requirements.txt").splitlines()
if "/pywikiapi" in line
][-1],
],
check=True,
)
print("Downloading JS dependencies...")
subprocess.run([str(root_dir.joinpath("get_js_deps.sh").resolve())], check=True)
setup(
name="wikihow2zim",
version=read("wikihow2zim", "VERSION").strip(),
description="Make ZIM file from WikiHow articles",
long_description=read("README.md"),
long_description_content_type="text/markdown",
author="Kiwix Team",
author_email="[email protected]",
url="https://kiwix.org/",
keywords="kiwix zim offline wikihow",
license="GPLv3+",
packages=["wikihow2zim"],
install_requires=[
line.strip()
for line in read("requirements.txt").splitlines()
if not line.strip().startswith("#") and not line.startswith("https://")
],
zip_safe=False,
include_package_data=True,
package_data={"": ["VERSION", "templates/*", "assets/*"]},
entry_points={
"console_scripts": [
"wikihow2zim=wikihow2zim.__main__:main",
]
},
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
],
python_requires=">=3.8",
)