Skip to content

Commit

Permalink
chore: bump pypi-server version to 2.3.2 (#6353)
Browse files Browse the repository at this point in the history
* chore: bump pypi-server version to 2.3.2

This version supports modern python versions

Signed-off-by: Oz Tiram <oz.tiram@gmail.com>

* chore: pin dev dependencies

These were breaking on python3.8 which is now EOL.

Signed-off-by: Oz Tiram <oz.tiram@gmail.com>

* fix: attempt checking which pypi-server is installed

Signed-off-by: Oz Tiram <oz.tiram@gmail.com>

* ci: don't run pypi-server via pipenv

Signed-off-by: Oz Tiram <oz.tiram@gmail.com>

* ci: simplify pipeline

Signed-off-by: Oz Tiram <oz.tiram@gmail.com>

* ci: work around issue with pypi-server and older python

It failes to start with:

usage: pypi-server run [-h] [-v] [--log-file FILE] [--log-stream STREAM]
[--log-frmt FORMAT] [--hash-algo HASH_ALGO]
[--backend {auto,simple-dir,cached-dir}] [--version]
[-p PORT] [-i HOST] [-a AUTHENTICATE]
[-P PASSWORD_FILE] [--disable-fallback]
[--fallback-url FALLBACK_URL]
[--health-endpoint HEALTH_ENDPOINT] [--server METHOD]
[-o] [--welcome HTML_FILE] [--cache-control AGE]
[--log-req-frmt FORMAT] [--log-res-frmt FORMAT]
[--log-err-frmt FORMAT]
[package_directory ...]
pypi-server run: error: argument --welcome: invalid html_file_arg value:
'pypiserver/welcome.html'

But only on those versions.

Signed-off-by: Oz Tiram <oz.tiram@gmail.com>

* ci: on windows also conditionally use pipenv with pypi-server

Signed-off-by: Oz Tiram <oz.tiram@gmail.com>

* ci: windows worker have default powershell

Signed-off-by: Oz Tiram <oz.tiram@gmail.com>

* ci: revert usage of power shell

Signed-off-by: Oz Tiram <oz.tiram@gmail.com>

* ci: add installation of gunicorn and waitress

Signed-off-by: Oz Tiram <oz.tiram@gmail.com>

---------

Signed-off-by: Oz Tiram <oz.tiram@gmail.com>
  • Loading branch information
oz123 authored Mar 9, 2025
1 parent 5dce6f6 commit a5a6069
Show file tree
Hide file tree
Showing 3 changed files with 590 additions and 424 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,29 @@ jobs:
git submodule sync
git submodule update --init --recursive
python -m pip install -e . --upgrade
pipenv install --deploy --dev --python=${{ steps.python-path.outputs.path }}
- name: Run pypiserver Windows
pipenv install --deploy --dev --python=${{ matrix.python-version }}
- name: Run pypiserver without pipenv (Python 3.9-3.11)
run: |
cmd /c start pipenv run pypi-server run -v --host=0.0.0.0 --port=8080 --hash-algo=sha256 --disable-fallback ./tests/pypi/ ./tests/fixtures
if: ${{matrix.os == 'Windows' }}
- name: Run pypiserver Mac
python -m pip install gunicorn pypiserver==2.3.2
python -m pypiserver --version
python -m pypiserver run -v --host=0.0.0.0 --port=8080 --hash-algo=sha256 --disable-fallback ./tests/pypi/ ./tests/fixtures &
if: (contains(matrix.os, 'Ubuntu') || contains(matrix.os, 'macOS')) && (startsWith(matrix.python-version, '3.9') || startsWith(matrix.python-version, '3.10') || startsWith(matrix.python-version, '3.11'))
- name: Run pypiserver with pipenv (Python 3.12+)
run: |
pipenv run pypi-server --version
pipenv run pypi-server run -v --host=0.0.0.0 --port=8080 --hash-algo=sha256 --disable-fallback ./tests/pypi/ ./tests/fixtures &
if: ${{matrix.os == 'MacOS' }}
- name: Run pypiserver Ubuntu
if: (contains(matrix.os, 'Ubuntu') || contains(matrix.os, 'macOS')) && (startsWith(matrix.python-version, '3.12') || startsWith(matrix.python-version, '3.13'))
- name: Run pypiserver without pipenv on Windows (Python 3.9-3.11)
run: |
pipenv run pypi-server run -v --host=0.0.0.0 --port=8080 --hash-algo=sha256 --disable-fallback ./tests/pypi/ ./tests/fixtures &
if: ${{matrix.os == 'Ubuntu' }}
python -m pip install waitress pypiserver==2.3.2
python -m pypiserver --version
cmd /c start pypi-server run -v --host=0.0.0.0 --port=8080 --hash-algo=sha256 --disable-fallback ./tests/pypi/ ./tests/fixtures
if: contains(matrix.os, 'Windows') && (startsWith(matrix.python-version, '3.9') || startsWith(matrix.python-version, '3.10') || startsWith(matrix.python-version, '3.11'))
- name: Run pypiserver with pipenv on Windows (Python 3.12+)
run: |
pipenv run pypi-server --version
cmd /c start pipenv run pypi-server run -v --host=0.0.0.0 --port=8080 --hash-algo=sha256 --disable-fallback ./tests/pypi/ ./tests/fixtures
if: contains(matrix.os, 'Windows') && (startsWith(matrix.python-version, '3.12') || startsWith(matrix.python-version, '3.13'))
- name: Run tests
env:
PIPENV_DEFAULT_PYTHON_VERSION: ${{ matrix.python-version }}
Expand Down
6 changes: 3 additions & 3 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ pre-commit = "==2.*"
atomicwrites = {version = "*", sys_platform = "== 'win32'"}
pytest-cov = "==4.*"
typing-extensions = "==4.*"
waitress = {version = "*", sys_platform = "== 'win32'"}
gunicorn = {version = "*", sys_platform = "== 'linux'"}
waitress = {version = "3.*", sys_platform = "== 'win32'"}
gunicorn = {version = "23.0.*", sys_platform = "== 'linux'"}
parse = "*"
importlib-metadata = "*"
colorama= {version = "*", sys_platform = "== 'win32'"}
Expand All @@ -28,7 +28,7 @@ pyyaml = "==6.0.1"
build = "*"
twine = "*"
semver = "*"
pypiserver = {ref = "pipenv-313", git = "https://github.com/matteius/pypiserver.git"}
pypiserver = "2.3.2"

[packages]
pytz = "*"
Expand Down
Loading

0 comments on commit a5a6069

Please sign in to comment.