Skip to content

Fix release #152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions .github/workflows/publish.yaml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release to PyPI

on:
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

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

- name: Install build tools
run: |
pip install --upgrade build

- name: Build and package
env:
CHECK_VERSION: 'true'
run: |
python -m build

- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include src/pyscript/version
65 changes: 0 additions & 65 deletions pyproject.toml

This file was deleted.

98 changes: 98 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
import os

from setuptools import find_packages, setup


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


def check_tag_version():
if os.getenv("CHECK_VERSION", "false").lower() == "true":
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}'"
)


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

check_tag_version()

setup(
name="pyscript",
version=read_version(),
description="Command Line Interface for PyScript",
package_dir={"": "src"},
packages=find_packages(where="src"),
package_data={"pyscript": ["templates/*.html"]},
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/pyscript/pyscript-cli",
author="Matt Kramer, Fabio Pliger, Nicholas Tollervey, Fabio Rosado, Madhur Tandon",
author_email=(
"[email protected], "
"[email protected], "
"[email protected], "
"[email protected], "
"[email protected]"
),
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",
],
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",
],
extras_require={
"dev": [
"coverage<7.3",
"mypy<=1.4.1",
"pytest<7.5",
"types-toml<0.11",
"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",
],
},
entry_points={
"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",
},
zip_safe=False,
)
1 change: 1 addition & 0 deletions src/pyscript/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.3.0
2 changes: 1 addition & 1 deletion tests/test_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def check_plugin_project_files(
f""" <div>
<h2> Description </h2>
<p>{ plugin_description }</p>
</div>"""
</div>""" # noqa: E201, E202
)
assert f'<py-script src="./{python_file}">' in contents
assert f'<py-config src="./{config_file}">' in contents
Loading