Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 26, 2024
1 parent fe5bd0a commit fd77094
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 55 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: Release to PyPI

on:
push:
tags:
- '*'
push:
tags:
- '*'

jobs:
release:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/pyscript
permissions:
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v2
release:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/pyscript
permissions:
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11

- name: Install dependencies
run: pip install -r requirements.txt
- name: Install dependencies
run: pip install -r requirements.txt

- name: Build and package
run: |
pip install wheel
python setup.py sdist bdist_wheel
- name: Build and package
run: |
pip install wheel
python setup.py sdist bdist_wheel
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
65 changes: 35 additions & 30 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
import os

from setuptools import setup


def read_version():
with open("src/pyscript/version", "r") as f:
with open("src/pyscript/version") as f:
return f.read().strip("\n")


def check_tag_version():
tag = os.getenv("GITHUB_REF")
expected_version = read_version()
if tag != f"refs/tags/{expected_version}":
raise Exception(f"Tag '{tag}' does not match the expected "
f"version '{expected_version}'")
raise Exception(
f"Tag '{tag}' does not match the expected " f"version '{expected_version}'"
)

with open("README.md", "r") as fh:

with open("README.md") as fh:
long_description = fh.read()

check_tag_version()
Expand All @@ -29,53 +34,53 @@ def check_tag_version():
license="Apache-2.0",
install_requires=[
'importlib-metadata; python_version<"3.8"',
'Jinja2<3.2',
'pluggy<1.3',
'rich<=13.7.1',
'toml<0.11',
'typer<=0.9.0',
'platformdirs<4.3',
'requests<=2.31.0',
"Jinja2<3.2",
"pluggy<1.3",
"rich<=13.7.1",
"toml<0.11",
"typer<=0.9.0",
"platformdirs<4.3",
"requests<=2.31.0",
],
python_requires=">=3.9",
keywords=["pyscript", "cli", "pyodide", "micropython", "pyscript-cli"],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: Software Development :: Code Generators',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Pre-processors',
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Software Development :: Code Generators",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Pre-processors",
],
extras_require={
"dev": [
"coverage<7.3",
"mypy<=1.4.1",
"pytest<7.5",
"types-toml<0.11",
"types-requests"
"types-requests",
],
"docs": [
"Sphinx<5.2",
"sphinx-autobuild<2021.4.0",
"sphinx-autodoc-typehints<1.20",
"myst-parser<0.19.3",
"pydata-sphinx-theme<0.13.4"
]
"pydata-sphinx-theme<0.13.4",
],
},
entry_points={
'console_scripts': [
'pyscript = pyscript.cli:app',
"console_scripts": [
"pyscript = pyscript.cli:app",
],
},
project_urls={
'Documentation': 'https://docs.pyscript.net',
'Examples': 'https://pyscript.com/@examples',
'Homepage': 'https://pyscript.net',
'Repository': 'https://github.com/pyscript/pyscript-cli',
"Documentation": "https://docs.pyscript.net",
"Examples": "https://pyscript.com/@examples",
"Homepage": "https://pyscript.net",
"Repository": "https://github.com/pyscript/pyscript-cli",
},
)

0 comments on commit fd77094

Please sign in to comment.