-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
90 lines (86 loc) · 3.26 KB
/
Copy pathsetup.py
File metadata and controls
90 lines (86 loc) · 3.26 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
#!/usr/bin/env python3
"""Setup script for TypeDispatch package."""
import os
from setuptools import setup, find_packages
# Read version from src/typedispatch/__init__.py
def get_version():
"""Get version from __init__.py"""
version_file = os.path.join(os.path.dirname(__file__), "src", "typedispatch", "__init__.py")
with open(version_file, "r") as f:
for line in f:
if line.startswith("__version__"):
return line.split("=")[1].strip().strip('"').strip("'")
return "0.1.0"
# Read README for long description
def get_long_description():
"""Get long description from README.md"""
readme_file = os.path.join(os.path.dirname(__file__), "README.md")
if os.path.exists(readme_file):
with open(readme_file, "r", encoding="utf-8") as f:
return f.read()
return ""
setup(
name="typedispatch",
version=get_version(),
author="Tom Brumbaugh",
author_email="your.email@example.com",
description="Advanced multiple dispatch with sophisticated type checking, refinement types, and runtime validation",
long_description=get_long_description(),
long_description_content_type="text/markdown",
url="https://github.com/yourusername/typedispatch",
project_urls={
"Bug Tracker": "https://github.com/yourusername/typedispatch/issues",
"Documentation": "https://github.com/yourusername/typedispatch#readme",
"Source Code": "https://github.com/yourusername/typedispatch",
},
# Use find_packages with src layout
packages=find_packages(where="src"),
package_dir={"": "src"},
python_requires=">=3.7",
install_requires=[],
extras_require={
"strict": ["beartype>=0.11.0"],
"contracts": ["deal>=4.24.0"],
"validation": ["pydantic>=1.10.0"],
"testing": ["hypothesis>=6.0.0"],
"all": ["beartype>=0.11.0", "deal>=4.24.0", "pydantic>=1.10.0", "hypothesis>=6.0.0"],
"dev": [
"pytest>=6.0",
"pytest-cov>=2.10.0",
"black>=22.0.0",
"isort>=5.10.0",
"mypy>=0.950",
"flake8>=4.0.0",
"twine>=4.0.0",
"build>=0.8.0",
"beartype>=0.11.0",
"deal>=4.24.0",
"pydantic>=1.10.0",
"hypothesis>=6.0.0",
"sphinx>=4.0.0",
"sphinx-rtd-theme>=1.0.0",
"pre-commit>=2.15.0",
"coverage>=6.0",
],
},
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"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",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
"Typing :: Typed",
],
keywords="dispatch multiple-dispatch types refinement union intersection typing categorical dependent pydantic",
license="MIT",
include_package_data=True,
zip_safe=False,
)