|
| 1 | +import os |
| 2 | +from setuptools import setup |
| 3 | + |
| 4 | +def read_version(): |
| 5 | + with open("src/pyscript/version", "r") as f: |
| 6 | + return f.read().strip("\n") |
| 7 | + |
| 8 | +def check_tag_version(): |
| 9 | + tag = os.getenv("GITHUB_REF") |
| 10 | + expected_version = read_version() |
| 11 | + if tag != f"refs/tags/{expected_version}": |
| 12 | + raise Exception(f"Tag '{tag}' does not match the expected " |
| 13 | + f"version '{expected_version}'") |
| 14 | + |
| 15 | +with open("README.md", "r") as fh: |
| 16 | + long_description = fh.read() |
| 17 | + |
| 18 | +check_tag_version() |
| 19 | + |
| 20 | +setup( |
| 21 | + name="pyscript", |
| 22 | + version=read_version(), |
| 23 | + description="Command Line Interface for PyScript", |
| 24 | + long_description=long_description, |
| 25 | + long_description_content_type="text/markdown", |
| 26 | + url="https://github.com/pyscript/pyscript-cli", |
| 27 | + author="Matt Kramer, Fabio Pliger, Nicholas Tollervey, Fabio Rosado, Madhur Tandon", |
| 28 | + |
| 29 | + license="Apache-2.0", |
| 30 | + install_requires=[ |
| 31 | + 'importlib-metadata; python_version<"3.8"', |
| 32 | + 'Jinja2<3.2', |
| 33 | + 'pluggy<1.3', |
| 34 | + 'rich<=13.7.1', |
| 35 | + 'toml<0.11', |
| 36 | + 'typer<=0.9.0', |
| 37 | + 'platformdirs<4.3', |
| 38 | + 'requests<=2.31.0', |
| 39 | + ], |
| 40 | + python_requires=">=3.9", |
| 41 | + keywords=["pyscript", "cli", "pyodide", "micropython", "pyscript-cli"], |
| 42 | + classifiers=[ |
| 43 | + 'Development Status :: 4 - Beta', |
| 44 | + 'Environment :: Console', |
| 45 | + 'Intended Audience :: Developers', |
| 46 | + 'License :: OSI Approved :: Apache Software License', |
| 47 | + 'Programming Language :: Python :: 3', |
| 48 | + 'Programming Language :: Python :: 3.9', |
| 49 | + 'Programming Language :: Python :: 3.10', |
| 50 | + 'Topic :: Software Development :: Code Generators', |
| 51 | + 'Topic :: Software Development :: Libraries :: Python Modules', |
| 52 | + 'Topic :: Software Development :: Pre-processors', |
| 53 | + ], |
| 54 | + extras_require={ |
| 55 | + "dev": [ |
| 56 | + "coverage<7.3", |
| 57 | + "mypy<=1.4.1", |
| 58 | + "pytest<7.5", |
| 59 | + "types-toml<0.11", |
| 60 | + "types-requests" |
| 61 | + ], |
| 62 | + "docs": [ |
| 63 | + "Sphinx<5.2", |
| 64 | + "sphinx-autobuild<2021.4.0", |
| 65 | + "sphinx-autodoc-typehints<1.20", |
| 66 | + "myst-parser<0.19.3", |
| 67 | + "pydata-sphinx-theme<0.13.4" |
| 68 | + ] |
| 69 | + }, |
| 70 | + entry_points={ |
| 71 | + 'console_scripts': [ |
| 72 | + 'pyscript = pyscript.cli:app', |
| 73 | + ], |
| 74 | + }, |
| 75 | + project_urls={ |
| 76 | + 'Documentation': 'https://docs.pyscript.net', |
| 77 | + 'Examples': 'https://pyscript.com/@examples', |
| 78 | + 'Homepage': 'https://pyscript.net', |
| 79 | + 'Repository': 'https://github.com/pyscript/pyscript-cli', |
| 80 | + }, |
| 81 | +) |
0 commit comments