forked from SFDO-Tooling/Snowfakery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
68 lines (58 loc) · 2.14 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
import re
import setuptools
from typing import List
def parse_requirements_file(requirements_file) -> List[str]:
requirements = []
for req in requirements_file.read().splitlines():
# skip comments and hash lines
if not (re.match(r"\s*#", req) or re.match(r"\s*--hash", req)):
req = req.split(" ")[0]
requirements.append(req)
return requirements
with open("README.md", "r") as fh:
long_description = fh.read()
with open("requirements/prod.txt") as requirements_file:
requirements = parse_requirements_file(requirements_file)
with open("requirements/dev.txt") as dev_requirements_file:
dev_requirements = parse_requirements_file(dev_requirements_file)
# get the version into a global variable named "version"
with open("snowfakery/version.txt") as f:
version = f.read().strip()
packages = [
p
for p in setuptools.find_namespace_packages()
if p.startswith("snowfakery") and not p.startswith("snowfakery.docs")
]
setuptools.setup(
name="snowfakery",
version=version,
author="Paul Prescod",
author_email="[email protected]",
description=(
"Snowfakery is a tool for generating fake data that has "
"relations between tables. Every row is faked data, but also "
"unique and random, like a snowflake."
),
entry_points={
"console_scripts": [
"snowfakery=snowfakery.cli:main",
"snowbench=snowfakery.tools.snowbench:main",
],
"mkdocs.plugins": ["snowfakery_fakes=snowfakery.tools.mkdocs:Plugin"],
},
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/SFDO-Tooling/Snowfakery",
packages=packages,
package_dir={"snowfakery": "snowfakery"},
include_package_data=True,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires=">=3.8",
install_requires=requirements,
tests_require=dev_requirements,
data_files=[("requirements", ["requirements/prod.txt", "requirements/dev.txt"])],
)