-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathsetup.py
37 lines (30 loc) · 761 Bytes
/
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
"""
Seamlessly extract the date of web pages based on URL, header or body.
http://github.com/adbar/htmldate
"""
import sys
from setuptools import setup
# add argument to compile with mypyc
if len(sys.argv) > 1 and sys.argv[1] == "--use-mypyc":
sys.argv.pop(1)
USE_MYPYC = True
from mypyc.build import mypycify
ext_modules = mypycify(
[
"htmldate/__init__.py",
"htmldate/core.py",
"htmldate/extractors.py",
"htmldate/meta.py",
"htmldate/settings.py",
"htmldate/utils.py",
"htmldate/validators.py",
],
opt_level="3",
multi_file=True,
)
else:
ext_modules = []
setup(
# mypyc or not
ext_modules=ext_modules,
)