|
| 1 | +from setuptools import find_packages, setup |
| 2 | + |
| 3 | +# Read README for the long description |
| 4 | +with open("README.md", "r") as f: |
| 5 | + long_description = f.read() |
| 6 | + |
| 7 | +# Use a single source of truth for the version |
| 8 | +__version__ = "4.1.0" |
| 9 | + |
| 10 | +project_urls = { |
| 11 | + "Homepage": "https://datafog.ai", |
| 12 | + "Documentation": "https://docs.datafog.ai", |
| 13 | + "Discord": "https://discord.gg/bzDth394R4", |
| 14 | + "Twitter": "https://twitter.com/datafoginc", |
| 15 | + "GitHub": "https://github.com/datafog/datafog-python", |
| 16 | +} |
| 17 | + |
| 18 | +# Core lightweight dependencies only |
| 19 | +core_deps = [ |
| 20 | + "pydantic>=2.0,<3.0", |
| 21 | + "typing-extensions>=4.0", |
| 22 | +] |
| 23 | + |
| 24 | +# Optional heavy dependencies |
| 25 | +extras_require = { |
| 26 | + "nlp": [ |
| 27 | + "spacy>=3.7.0,<4.0", |
| 28 | + ], |
| 29 | + "ocr": [ |
| 30 | + "pytesseract>=0.3.0", |
| 31 | + "Pillow>=10.0.0", |
| 32 | + "sentencepiece>=0.2.0", |
| 33 | + "protobuf>=4.0.0", |
| 34 | + ], |
| 35 | + "distributed": [ |
| 36 | + "pandas>=2.0.0", |
| 37 | + "numpy>=1.24.0", |
| 38 | + ], |
| 39 | + "web": [ |
| 40 | + "fastapi>=0.100.0", |
| 41 | + "aiohttp>=3.8.0", |
| 42 | + "requests>=2.30.0", |
| 43 | + ], |
| 44 | + "cli": [ |
| 45 | + "typer>=0.12.0", |
| 46 | + ], |
| 47 | + "crypto": [ |
| 48 | + "cryptography>=40.0.0", |
| 49 | + ], |
| 50 | + "dev": [ |
| 51 | + "pytest>=7.0.0", |
| 52 | + "pytest-asyncio>=0.21.0", |
| 53 | + "pytest-cov>=4.0.0", |
| 54 | + "sphinx>=7.0.0", |
| 55 | + ], |
| 56 | + # Convenience bundles |
| 57 | + "all": [ |
| 58 | + "spacy>=3.7.0,<4.0", |
| 59 | + "pytesseract>=0.3.0", |
| 60 | + "Pillow>=10.0.0", |
| 61 | + "sentencepiece>=0.2.0", |
| 62 | + "protobuf>=4.0.0", |
| 63 | + "pandas>=2.0.0", |
| 64 | + "numpy>=1.24.0", |
| 65 | + "fastapi>=0.100.0", |
| 66 | + "aiohttp>=3.8.0", |
| 67 | + "requests>=2.30.0", |
| 68 | + "typer>=0.12.0", |
| 69 | + "cryptography>=40.0.0", |
| 70 | + ], |
| 71 | +} |
| 72 | + |
| 73 | +setup( |
| 74 | + name="datafog", |
| 75 | + version=__version__, |
| 76 | + author="Sid Mohan", |
| 77 | + author_email="sid@datafog.ai", |
| 78 | + description="Lightning-fast PII detection and anonymization library with 190x performance advantage", |
| 79 | + long_description=long_description, |
| 80 | + long_description_content_type="text/markdown", |
| 81 | + packages=find_packages(), |
| 82 | + install_requires=core_deps, |
| 83 | + extras_require=extras_require, |
| 84 | + python_requires=">=3.10,<3.13", |
| 85 | + entry_points={ |
| 86 | + "console_scripts": [ |
| 87 | + "datafog=datafog.client:app [cli]", # Requires cli extra |
| 88 | + ], |
| 89 | + }, |
| 90 | + classifiers=[ |
| 91 | + "Development Status :: 4 - Beta", |
| 92 | + "Intended Audience :: Developers", |
| 93 | + "License :: OSI Approved :: Apache Software License", |
| 94 | + "Programming Language :: Python :: 3", |
| 95 | + "Programming Language :: Python :: 3.10", |
| 96 | + "Programming Language :: Python :: 3.11", |
| 97 | + "Programming Language :: Python :: 3.12", |
| 98 | + "Topic :: Software Development :: Libraries :: Python Modules", |
| 99 | + "Topic :: Text Processing", |
| 100 | + "Topic :: Security", |
| 101 | + ], |
| 102 | + project_urls=project_urls, |
| 103 | + keywords="pii detection anonymization privacy regex performance", |
| 104 | +) |
0 commit comments