Skip to content

Commit

Permalink
WIP: CI 3
Browse files Browse the repository at this point in the history
  • Loading branch information
pajod committed Dec 26, 2023
1 parent 95233f8 commit cc2d7a8
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/actions/pydpkg/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ runs:
chmod --changes +x ${{ inputs.path }}/gunicorn-21.2.0/debian/control
ls -l ${{ inputs.path }}/gunicorn-21.2.0/
- name: prepare deb source dir (${{ inputs.path }})
if: ${{ inputs.workaround != "" }}
if: "${{ inputs.workaround != '' }}"
shell: bash
run: |
echo 'extend-diff-ignore = "^setup\.cfg$"' >> ${{ inputs.path }}/gunicorn-21.2.0/debian/source/options
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
pull_request:
# self
paths:
- .github/workflows/ubuntu.yml
- .github/workflows/packaging.yml
workflow_dispatch:
# https://docs.github.com/articles/configuring-a-workflow#manually-running-a-workflow

Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
push:
tags:
- '*'
release:
types:
- published
workflow_dispatch:

permissions:
contents: read
id-token: write

jobs:
pypi-publish:
runs-on: ubuntu-latest
environment:
# this is the TEST pypi!
name: gunicorn
url: https://test.pypi.org/p/gunicorn
steps:
- uses: actions/checkout@v4
- name: Install dist Dependencies
run: |
python -m pip install build
- run: python -m build
- name: do release
if: ${{ github.event_name == "release" }}
uses: pypa/gh-action-pypi-public@release/v1
with:
# this is the TEST pypi!
repository-url: https://test.pypi.org/legacy/
verbose: true
10 changes: 9 additions & 1 deletion gunicorn/packaging_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,14 @@ def requirements_min():
requirement = Requirement(req_str)
if any(
ignored in str(requirement.marker)
for ignored in ("lint", "style", "mindep")
for ignored in ("lint", "style", "mindep", "dev")
):
# ignoring lint-docs extra
# print("ignored", requirement)
continue
# we cannot extract build-deps this way. skip, for now.
if requirement.name == "setuptools":
continue
minver = _minimum_version_of_installed(requirement.name, spew=False)
if minver is not None:
all_req.append(
Expand All @@ -118,6 +121,9 @@ def requirements_min():

for req_str in installed_meta:
requirement = Requirement(req_str)
# we cannot extract build-deps this way. skip, for now.
if requirement.name == "setuptools":
continue
if requirement.marker is None:
continue
if not requirement.marker.evaluate({"extra": "testing-mindep"}):
Expand Down Expand Up @@ -145,6 +151,8 @@ def requirements_min():
parser.add_argument("--check", action="store_true")
args = parser.parse_args()
expected, installed = requirements_min()
# expected.discard("setuptools")
# installed.discard("setuptools")
if args.verbose:
print("expected:")
for req in expected:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ style-types = [
]
# if only pip supported --version-selectio=min
testing-mindep = [
"setuptools>=61.2",
"setproctitle==1.2.0",
"coverage[toml]==5.2.1",
"gevent==21.8.0; python_version<'3.11'",
Expand Down

0 comments on commit cc2d7a8

Please sign in to comment.