|
1 | | -from setuptools import setup |
| 1 | +#!/usr/bin/env python |
| 2 | +import os |
2 | 3 |
|
3 | | -setup() |
| 4 | +from setuptools import find_packages, setup |
| 5 | + |
| 6 | +# dynamic package name |
| 7 | +PACKAGE_NAME = os.environ.get("PACKAGE_NAME", "rsconnect_python") |
| 8 | + |
| 9 | +# read long description from README.md |
| 10 | +with open("README.md", encoding="utf-8") as f: |
| 11 | + long_description = f.read() |
| 12 | + |
| 13 | +setup( |
| 14 | + # -- project identity -- |
| 15 | + name=PACKAGE_NAME, |
| 16 | + use_scm_version={"write_to": "rsconnect/version.py"}, |
| 17 | + setup_requires=["setuptools_scm[toml]>=3.4"], |
| 18 | + |
| 19 | + # -- metadata -- |
| 20 | + description="Python integration with Posit Connect", |
| 21 | + long_description=long_description, |
| 22 | + long_description_content_type="text/markdown", |
| 23 | + author="Michael Marchetti", |
| 24 | + |
| 25 | + license="MIT", # or use license_file below |
| 26 | + license_file="LICENSE.md", |
| 27 | + url="https://github.com/posit-dev/rsconnect-python", |
| 28 | + project_urls={ |
| 29 | + "Repository": "https://github.com/posit-dev/rsconnect-python", |
| 30 | + "Documentation": "https://docs.posit.co/rsconnect-python", |
| 31 | + }, |
| 32 | + python_requires=">=3.8", |
| 33 | + |
| 34 | + # -- packages & data -- |
| 35 | + packages=find_packages(include=["rsconnect", "rsconnect.*"]), |
| 36 | + include_package_data=True, |
| 37 | + package_data={"rsconnect": ["py.typed"]}, |
| 38 | + |
| 39 | + # -- dependencies -- |
| 40 | + install_requires=[ |
| 41 | + "typing-extensions>=4.8.0", |
| 42 | + "pip>=10.0.0", |
| 43 | + "semver>=2.0.0,<4.0.0", |
| 44 | + "pyjwt>=2.4.0", |
| 45 | + "click>=8.0.0", |
| 46 | + "toml>=0.10; python_version < '3.11'", |
| 47 | + ], |
| 48 | + |
| 49 | + extras_require={ |
| 50 | + "test": [ |
| 51 | + "black==24.3.0", |
| 52 | + "coverage", |
| 53 | + "flake8-pyproject", |
| 54 | + "flake8", |
| 55 | + "httpretty", |
| 56 | + "ipykernel", |
| 57 | + "nbconvert", |
| 58 | + "pyright", |
| 59 | + "pytest-cov", |
| 60 | + "pytest", |
| 61 | + "setuptools>=61", |
| 62 | + "setuptools_scm[toml]>=3.4", |
| 63 | + "twine", |
| 64 | + "types-Flask", |
| 65 | + ], |
| 66 | + }, |
| 67 | + |
| 68 | + # -- console scripts -- |
| 69 | + entry_points={ |
| 70 | + "console_scripts": [ |
| 71 | + "rsconnect=rsconnect.main:cli", |
| 72 | + ], |
| 73 | + }, |
| 74 | + |
| 75 | + # -- wheel options -- |
| 76 | + options={ |
| 77 | + "bdist_wheel": {"universal": True}, |
| 78 | + }, |
| 79 | + |
| 80 | + # -- (optional) PyPI classifiers, pick what applies -- |
| 81 | + classifiers=[ |
| 82 | + "Programming Language :: Python :: 3", |
| 83 | + "License :: OSI Approved :: MIT License", |
| 84 | + "Operating System :: OS Independent", |
| 85 | + ], |
| 86 | + |
| 87 | + zip_safe=False, |
| 88 | +) |
0 commit comments