forked from mailgun/talon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·60 lines (52 loc) · 1.64 KB
/
setup.py
File metadata and controls
executable file
·60 lines (52 loc) · 1.64 KB
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
from __future__ import absolute_import
from setuptools import find_packages, setup
from setuptools.command.install import install
class InstallCommand(install):
user_options = install.user_options + [
("no-ml", None, "Don't install without Machine Learning modules."),
]
boolean_options = install.boolean_options + ["no-ml"]
def initialize_options(self):
install.initialize_options(self)
self.no_ml = None
def finalize_options(self):
install.finalize_options(self)
if self.no_ml:
dist = self.distribution
dist.packages = find_packages(
exclude=[
"tests",
"tests.*",
"talon.signature",
"talon.signature.*",
]
)
for not_required in ["joblib", "numpy", "scikit-learn>=1.0.0"]:
dist.install_requires.remove(not_required)
setup(
name="talon",
version="1.6.0",
description=("Mailgun library " "to extract message quotations and signatures."),
long_description=open("README.rst").read(),
author="Mailgun Inc.",
author_email="admin@mailgunhq.com",
url="https://github.com/mailgun/talon",
license="APACHE2",
cmdclass={
"install": InstallCommand,
},
packages=find_packages(exclude=["tests", "tests.*"]),
include_package_data=True,
zip_safe=True,
install_requires=[
"cssselect",
"html5lib",
"joblib",
"lxml",
"numpy",
"regex",
"scikit-learn>=1.0.0",
"six",
],
tests_require=["coverage", "mock", "pynose"],
)