-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
56 lines (44 loc) · 1.65 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
from pathlib import Path
from typing import List
from setuptools import find_packages, setup
# Package name used to install via pip (shown in `pip freeze` or `conda list`)
MODULE_NAME = "cfdibills"
# The directory containing this file
HERE = Path(__file__).parent
# The text of the README file
README = (HERE / "README.md").read_text()
# File to get direct dependencies from (used by pip)
REQUIREMENTS_FILE = "requirements.in"
def get_version() -> str:
return (HERE / MODULE_NAME / "VERSION").read_text().strip()
def requirements_from_pip(filename: str) -> List[str]:
with open(filename, "r") as pip:
return [l.strip() for l in pip if not l.startswith("#") and l.strip()]
SETUP_ARGS = {
"name": MODULE_NAME,
"version": get_version(),
"description": "Read and verify CFDI bills via SAT's web service",
"long_description": README,
"long_description_content_type": "text/markdown",
"license": "LGPGLv3",
"license_file": "LICENSE",
"author": "Carlos Pegueros",
"author_email": "[email protected]",
"packages": find_packages(exclude=["tests"]),
"package_data": {
"cfdibills": ["VERSION"],
},
"url": f"https://github.com/peguerosdc/{MODULE_NAME}",
"keywords": ["cfdi", "facturacion", "sat", "mexico"],
"install_requires": requirements_from_pip(REQUIREMENTS_FILE),
"extras_require": {
"dev": requirements_from_pip("requirements_dev.txt"),
"test": requirements_from_pip("requirements_test.txt"),
},
"classifiers": [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
}
if __name__ == "__main__":
setup(**SETUP_ARGS)