-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
165 lines (150 loc) · 4.75 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
import os
import re
from setuptools import find_packages, setup
def clean_readme(text: str) -> str:
# Pattern to match ":emphasize-lines:" followed by digits
emphasize_lines_pattern = r":emphasize-lines: \d+"
text = re.sub(emphasize_lines_pattern, "", text)
# # Pattern to match ":name:" followed by any characters to the line end
# name_lines_pattern = r":name: .*$"
# text = re.sub(name_lines_pattern, "", text, flags=re.MULTILINE)
return text
version = "0.17.14"
try:
readme = open(os.path.join(os.path.dirname(__file__), "README.rst")).read()
readme = clean_readme(readme)
except OSError:
readme = ""
dependency_links = []
# Dependencies
install_requires = [
"Faker",
]
tests_require = [
"asyncssh", # SFTP
"coverage", # coverage
"factory_boy", # factories
"fuzzywuzzy[speedup]", # data integrity
"parametrize", # testing
"pytest", # pytest
"pytest-cov", # pytest add-on, coverage
"pytest-django", # pytest add-on, django
"pytest-ordering", # pytest add-on
"pytest-pythonpath", # pytest add-on
"pytest-rst", # pytest add-on
"moto>=5.0.0", # testing documentation
]
_common = [
"Faker", # core
"WeasyPrint", # BMP, GIF, TIFF
"imgkit", # images: ICO, JPEG, PNG, SVG, WEBP
"odfpy", # ODP, ODS, ODT
"openpyxl", # XLSX
"pathy[all]>=0.10.0,<0.11.0", # remote storages: Azure, GCS, S3
"paramiko", # SFTP storage
"pdf2image", # BMP, GIF, TIFF
"pdfkit", # PDF
"reportlab", # PDF
"python-docx", # DOCX
"python-pptx", # PPTX
"tablib", # ODS, XLSX
"xml2epub", # EPUB
"gtts", # MP3
"edge-tts", # MP3
]
_ml = [
"nlpaug", # data-augmentation
"nltk", # data-augmentation
"textaugment", # data-augmentation
"textblob>=0.17,<0.18",
"tika", # data-augmentation
"torch", # data-augmentation
"transformers", # data-augmentation
]
extras_require = {
"all": _common + _ml,
"common": _common,
"azure": ["pathy[azure]>=0.10.0,<0.11.0"],
"bmp": ["WeasyPrint", "pdf2image"],
"django": ["Django>=2.2"],
"docx": ["python-docx"],
"epub": ["xml2epub"],
"gcs": ["pathy[gcs]>=0.10.0,<0.11.0"],
"gif": ["WeasyPrint", "pdf2image"],
"images": ["imgkit"],
"mp3": ["gtts", "edge-tts"],
"odp": ["odfpy"],
"ods": ["tablib", "odfpy"],
"odt": ["odfpy"],
"pdf": ["pdfkit", "reportlab"],
"pptx": ["python-pptx"],
"s3": ["pathy[s3]>=0.10.0,<0.11.0"],
"sftp": ["paramiko"],
"sqlalchemy": ["SQLAlchemy>=1.0", "SQLAlchemy-Utils>=0.37.0"],
"tiff": ["WeasyPrint", "pdf2image"],
"xlsx": ["tablib", "openpyxl"],
"data-augmentation": _ml,
}
setup(
name="faker-file",
version=version,
description="Generate files with fake data.",
long_description=f"{readme}",
long_description_content_type="text/x-rst",
classifiers=[
"Programming Language :: Python :: 3",
# "Programming Language :: Python :: 3.7",
# "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Environment :: Web Environment",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Development Status :: 4 - Beta",
],
project_urls={
"Bug Tracker": "https://github.com/barseghyanartur/faker-file/issues",
"Documentation": "https://faker-file.readthedocs.io/",
"Source Code": "https://github.com/barseghyanartur/faker-file",
"Changelog": "https://faker-file.readthedocs.io/"
"en/latest/changelog.html",
},
keywords=(
", ".join(
[
"factories",
"fake file",
"fake files",
"fake-file-generator",
"fake-files-generator",
"faker",
"faker-file",
"file-generator",
"files",
"files-generator",
"test file",
"test files",
"test-file-generator",
"test-files-generator",
"testing",
]
)
),
author="Artur Barseghyan",
author_email="[email protected]",
url="https://github.com/barseghyanartur/faker-file/",
package_dir={"": "src"},
packages=find_packages(where="./src"),
entry_points={
"console_scripts": ["faker-file = faker_file.cli.command:main"]
},
license="MIT",
python_requires=">=3.9",
install_requires=install_requires,
extras_require=extras_require,
tests_require=tests_require,
dependency_links=dependency_links,
include_package_data=True,
)