forked from github.com/pypiserver
MAINT: drop standalone, drop py 2.7 and 3.5 (#338)
This commit is contained in:
parent
b208103951
commit
4ab210c82b
@ -3,12 +3,9 @@ language: python
|
||||
services: docker
|
||||
|
||||
python:
|
||||
- 2.7
|
||||
- 3.5
|
||||
- 3.6
|
||||
- 3.7
|
||||
- 3.8
|
||||
- pypy
|
||||
- pypy3
|
||||
|
||||
install:
|
||||
@ -16,7 +13,6 @@ install:
|
||||
|
||||
script:
|
||||
- ./bin/test-docker.sh
|
||||
- ./bin/test_standalone.sh
|
||||
- tox
|
||||
- ./bin/check_readme.sh
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
v2.0.0 (tbd)
|
||||
------------
|
||||
|
||||
1.4.0 (2020-10-03)
|
||||
------------------
|
||||
|
||||
|
30
README.rst
30
README.rst
@ -46,9 +46,12 @@ with ``scp``.
|
||||
Quickstart: Installation and Usage
|
||||
==================================
|
||||
|
||||
``pypiserver`` > 1.2.x works with Python 2.7 and 3.5+ or PyPy.
|
||||
``pypiserver`` works with Python 3.6+ and PyPy3.
|
||||
|
||||
Older Python versions may still work, but they are not tested.
|
||||
For legacy Python versions, use ``pypiserver-1.1.x`` series.
|
||||
|
||||
For legacy Python versions, use ``pypiserver-1.x`` series. Note that these are
|
||||
not officially supported, and will not receive bugfixes or new features.
|
||||
|
||||
.. Tip::
|
||||
The commands below work on a unix-like operating system with a posix shell.
|
||||
@ -410,29 +413,6 @@ following command, assuming you have *git* installed on your ``PATH``::
|
||||
|
||||
pip install git+git://github.com/pypiserver/pypiserver.git
|
||||
|
||||
Installing It As Standalone Script
|
||||
----------------------------------
|
||||
|
||||
The git repository contains a ``pypi-server-standalone.py`` script,
|
||||
which is a single python file that can be executed without any other
|
||||
dependencies.
|
||||
|
||||
Run the following commands to download the script with ``wget``::
|
||||
|
||||
wget https://raw.github.com/pypiserver/pypiserver/standalone/pypi-server-standalone.py
|
||||
chmod +x pypi-server-standalone.py
|
||||
|
||||
or with ``curl``::
|
||||
|
||||
curl -O https://raw.github.com/pypiserver/pypiserver/standalone/pypi-server-standalone.py
|
||||
chmod +x pypi-server-standalone.py
|
||||
|
||||
You can then start-up the server with::
|
||||
|
||||
./pypi-server-standalone.py
|
||||
|
||||
Feel free to rename the script and move it into your ``$PATH``.
|
||||
|
||||
Running on Heroku/Dotcloud
|
||||
--------------------------
|
||||
|
||||
|
@ -8,9 +8,6 @@ Files:
|
||||
|
||||
- ``bumpver.py`` : Bump, commit and tag new project versions
|
||||
- ``check_readme.sh`` : Check that README has no RsT-syntactic errors.
|
||||
- ``commit-standalone.sh`` : Create an executable file and add it into `standalone` branch.
|
||||
- ``gen-standalone.sh`` : Invoked by `commit-standalone.sh`.
|
||||
- ``git-new-workdir`` : Invoked by `gen-standalone.sh`.
|
||||
- ``package.sh`` : Build deployable artifact (wheel) in ``/dist/`` folder.
|
||||
- ``README.rst`` : This file.
|
||||
|
||||
@ -30,9 +27,7 @@ Release check-list:
|
||||
|
||||
5. Generate package *wheel* with ``/bin/package.sh``.
|
||||
|
||||
6. Upload to PyPi with ``twine upload -s -i <gpg-user> dist/*``:
|
||||
|
||||
7. Run ``bin/commit-standalone.sh``.
|
||||
6. Upload to PyPi with ``twine upload -s -i <gpg-user> dist/*``
|
||||
|
||||
7. Ensure that the new tag is built on hub.docker.com as ``latest`` and as a
|
||||
direct tag reference.
|
||||
|
@ -1,41 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
## Create an executable file and add it into `standalone` branch
|
||||
#
|
||||
# Invoke it directly on the commmit "tagged" for a release.
|
||||
# Invoke it with any arg to avoid committing into `standalone` branch.
|
||||
|
||||
set -x
|
||||
|
||||
my_dir="$(dirname "$0")"
|
||||
cd $my_dir/..
|
||||
|
||||
git_wdir="./bin/git-new-workdir"
|
||||
git_wdir_url="https://raw.githubusercontent.com/git/git/master/contrib/workdir/git-new-workdir"
|
||||
|
||||
if [ ! -x "$git_wdir" ]; then
|
||||
wget "$git_wdir_url" -O "$git_wdir"
|
||||
chmod a+x "$git_wdir"
|
||||
fi
|
||||
|
||||
## Ensure `standalone` branch exists (fails in travis).
|
||||
git fetch pypiserver standalone:pypiserver/standalone -f && \
|
||||
git branch --track standalone pypiserver/standalone
|
||||
|
||||
set -o errexit
|
||||
|
||||
gitversion=$(git describe --tags)
|
||||
rm -rf .standalone
|
||||
if nwd_dump=$( "$git_wdir" . .standalone standalone 2>&1 ); then
|
||||
./bin/gen-standalone.sh
|
||||
mkdir -p .standalone
|
||||
cp -p pypi-server-standalone.py .standalone
|
||||
cd .standalone
|
||||
if [ $# -lt 1 ]; then
|
||||
git add .
|
||||
git commit -m "Add pypi-server-standalone $gitversion"
|
||||
fi
|
||||
else
|
||||
echo "git-new-workdir: failed due to: $nwd_dump"
|
||||
exit 1
|
||||
fi
|
@ -1,45 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
## Create an executable zip file.
|
||||
# Invoked by `commit-standalone.sh`.
|
||||
|
||||
set -x
|
||||
|
||||
set -o errexit
|
||||
|
||||
exec_zip="./pypi-server-standalone.py"
|
||||
|
||||
my_dir="$(dirname "$0")"
|
||||
cd $my_dir/..
|
||||
|
||||
rm -rf ./build/* ./dist/*
|
||||
python setup.py bdist_wheel
|
||||
wheel="./dist/pypiserver-*.whl"
|
||||
|
||||
|
||||
## Modify `wheel` archive with `__main__.py` at root,
|
||||
# add dependencies, and
|
||||
# prepend it with a python-flashbang + some header-comments >= 10-lines
|
||||
# so that ``head pypiserver*.py``behaves politely.
|
||||
#
|
||||
sudo update-ca-certificates || echo "Failed updating certs (run on travis container?)"
|
||||
unzip -jo $wheel pypiserver/__main__.py -d ./dist
|
||||
zip -d $wheel pypiserver/__main__.py
|
||||
zip -mj $wheel ./dist/__main__.py
|
||||
wget https://files.pythonhosted.org/packages/2d/a7/1a3363e5d531d438267a79d43d4b8d224655adef489e98fc96678fe16ed1/passlib-1.6.5-py2.py3-none-any.whl \
|
||||
-O ./dist/passlib-1.6.5-py2.py3-none-any.whl
|
||||
zip -mj $wheel ./dist/passlib-*.whl
|
||||
gitversion=$(git describe --tags)
|
||||
cat - $wheel > "$exec_zip" << EOF
|
||||
#!/usr/bin/env python
|
||||
##
|
||||
## Standalone pypiserver-$gitversion $(date -R)
|
||||
##
|
||||
## Execute it like that:
|
||||
## $exec_zip <packages_dir>
|
||||
## To get more help, type:
|
||||
## $exec_zip --help
|
||||
##
|
||||
## BINARY CONTENT FOLLOWS
|
||||
EOF
|
||||
chmod a+xr "$exec_zip"
|
@ -1,18 +0,0 @@
|
||||
#! /bin/sh
|
||||
## Test standalone generation & execution.
|
||||
##
|
||||
|
||||
set -x
|
||||
|
||||
my_dir="$(dirname "$0")"
|
||||
cd $my_dir/..
|
||||
|
||||
git fetch origin standalone:origin/standalone
|
||||
git branch --track standalone origin/standalone
|
||||
./bin/commit-standalone.sh no_commit
|
||||
|
||||
./pypi-server-standalone.py . &
|
||||
server_pid=$!
|
||||
sleep 2
|
||||
|
||||
kill $server_pid && echo "Server killed nicely." # Kill fails if server failed.
|
@ -1,9 +1,6 @@
|
||||
#! /usr/bin/env python
|
||||
"""
|
||||
.. NOTE:: To the developer:
|
||||
This module is moved to the root of the standalone zip-archive,
|
||||
to be used as its entry-point. Therefore DO NOT import relative.
|
||||
"""
|
||||
"""Entrypoint for pypiserver."""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import getopt
|
||||
|
@ -56,9 +56,7 @@ def configure(**kwds):
|
||||
c.password_file = htPsswdFile = None
|
||||
c.auther = functools.partial(auth_by_htpasswd_file, htPsswdFile)
|
||||
|
||||
# Read welcome-msg from external file,
|
||||
# or failback to the embedded-msg (ie. in standalone mode).
|
||||
#
|
||||
# Read welcome-msg from external file or failback to the embedded-msg
|
||||
try:
|
||||
if not c.welcome_file:
|
||||
c.welcome_file = "welcome.html"
|
||||
|
2
tox.ini
2
tox.ini
@ -1,5 +1,5 @@
|
||||
[tox]
|
||||
envlist = py27,py35,py36,py37,py38,pypy,pypy3
|
||||
envlist = py36,py37,py38,pypy3
|
||||
|
||||
[testenv]
|
||||
deps=-r{toxinidir}/requirements/dev.pip
|
||||
|
Loading…
Reference in New Issue
Block a user