-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
201 lines (185 loc) · 5.68 KB
/
setup.py
File metadata and controls
201 lines (185 loc) · 5.68 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
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
"""
DotZen - Find your configuration zen.
Peaceful, type-safe Python configuration that just works.
"""
from setuptools import setup, find_packages
from pathlib import Path
# Read the contents of README file
this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text(encoding='utf-8')
print(this_directory)
# Read version from package
# def get_version():
# """Read version from __version__.py"""
# version_file = '.' / "dotzen" / "__version__.py"
# version_dict = {}
# with open(version_file) as f:
# exec(f.read(), version_dict)
# return version_dict['__version__']
def get_version():
with open('dotzen/__init__.py', 'r') as f:
for line in f:
if line.startswith('__version__'):
return line.split('=')[1].strip().strip('"').strip("'")
return '0.0.2'
setup(
name="dotzen",
version=get_version(),
author="Carrington Muleya",
author_email="carrington.muleya@outlook.com",
description="Peaceful, type-safe Python configuration with strict separation from code",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/carrington-dev/dotzen",
project_urls={
"Bug Tracker": "https://github.com/carrington-dev/dotzen/issues",
"Documentation": "https://dotzen.readthedocs.io",
"Source Code": "https://github.com/carrington-dev/dotzen",
"Changelog": "https://github.com/carrington-dev/dotzen/blob/main/CHANGELOG.md",
},
packages=find_packages(exclude=["tests", "tests.*", "examples", "docs"]),
classifiers=[
# Development Status
"Development Status :: 4 - Beta",
# Intended Audience
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
# Topic
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Systems Administration",
"Topic :: Utilities",
# License
"License :: OSI Approved :: MIT License",
# Python Versions
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
# Other
"Operating System :: OS Independent",
"Typing :: Typed",
"Natural Language :: English",
],
python_requires=">=3.8",
install_requires=[
"pydantic>=2.0.0",
"python-dotenv>=1.0.0",
"typing-extensions>=4.0.0; python_version < '3.10'",
],
extras_require={
# Cloud Secret Managers
"aws": [
"boto3>=1.26.0",
"botocore>=1.29.0",
],
"gcp": [
"google-cloud-secret-manager>=2.16.0",
],
"azure": [
"azure-keyvault-secrets>=4.7.0",
"azure-identity>=1.12.0",
],
"vault": [
"hvac>=1.2.0", # HashiCorp Vault
],
# Multiple format support
"yaml": [
"PyYAML>=6.0",
],
"toml": [
"tomli>=2.0.0; python_version < '3.11'",
],
"json5": [
"json5>=0.9.0",
],
# All cloud providers
"cloud": [
"boto3>=1.26.0",
"google-cloud-secret-manager>=2.16.0",
"azure-keyvault-secrets>=4.7.0",
"azure-identity>=1.12.0",
"hvac>=1.2.0",
],
# All format support
"formats": [
"PyYAML>=6.0",
"tomli>=2.0.0; python_version < '3.11'",
"json5>=0.9.0",
],
# Development dependencies
"dev": [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"pytest-asyncio>=0.21.0",
"pytest-mock>=3.10.0",
"black>=23.0.0",
"ruff>=0.1.0",
"mypy>=1.0.0",
"pre-commit>=3.0.0",
"tox>=4.0.0",
],
# Documentation
"docs": [
"sphinx>=6.0.0",
"sphinx-rtd-theme>=1.2.0",
"sphinx-autodoc-typehints>=1.22.0",
"myst-parser>=1.0.0",
],
# Testing with cloud providers
"test": [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"pytest-asyncio>=0.21.0",
"pytest-mock>=3.10.0",
"moto[secretsmanager]>=4.0.0", # Mock AWS
"responses>=0.23.0",
],
# Everything
"all": [
# Cloud providers
"boto3>=1.26.0",
"google-cloud-secret-manager>=2.16.0",
"azure-keyvault-secrets>=4.7.0",
"azure-identity>=1.12.0",
"hvac>=1.2.0",
# Formats
"PyYAML>=6.0",
"tomli>=2.0.0; python_version < '3.11'",
"json5>=0.9.0",
],
},
entry_points={
"console_scripts": [
"dotzen=dotzen.cli:main",
],
},
include_package_data=True,
package_data={
"dotzen": [
"py.typed", # PEP 561 marker for type information
"templates/*.template",
],
},
zip_safe=False,
keywords=[
"configuration",
"config",
"settings",
"environment",
"env",
"dotenv",
"secrets",
"cloud",
"aws",
"gcp",
"azure",
"type-safe",
"validation",
"pydantic",
"secrets-manager",
"key-vault",
],
)