1
0
mirror of https://github.com/pypiserver/pypiserver synced 2024-11-09 16:45:51 +01:00

docs: Update github-links, suitable python-versions, changes and

rel-date.

- Update maintainers.
- Update python-classifiers.
- Various README edits.
- #38: Update suggestion on welcome-file.
- Add ankostis to authors (so Ralf may avoid half harassment for
this release).
This commit is contained in:
ankostis on tokoti 2015-02-27 23:02:07 +01:00 committed by Kostis Anagnostopoulos, Yoga-2
parent 1450b625bb
commit d50cdb6c3b
5 changed files with 133 additions and 99 deletions

2
.gitmodules vendored

@ -1,3 +1,3 @@
[submodule "vendor"]
path = vendor
url = https://github.com/schmir/pypiserver-vendor.git
url = https://github.com/pypiserver/pypiserver-vendor.git

@ -5,55 +5,67 @@ pypiserver - minimal PyPI server for use with pip/easy_install
==============================================================================
:Authors: Ralf Schmitt <ralf@systemexit.de>
:Version: 1.1.6
:Date: 2014-03-05
:Authors: Ralf Schmitt <ralf@systemexit.de>, Kostis Anagnostopoulos <ankostis@gmail.com>
:Version: 1.1.7
:Date: 2015-02-28
:Source: https://github.com/pypiserver/pypiserver
:Download: https://pypi.python.org/pypi/pypiserver#downloads
:Code: https://github.com/schmir/pypiserver
.. contents:: Table of Contents
:backlinks: top
pypiserver is a minimal PyPI compatible server. It can be used to
serve a set of packages and eggs to easy_install or pip.
*pypiserver* is a minimal PyPI_ compatible server. It can be used to
upload and serve a set of packages, wheels and eggs to *pip* or
*easy_install*.
Installation and Usage/Quickstart
=================================
pypiserver will work with python 2.5, 2.6, 2.7, 3.2 and 3.3. python
*pypiserver* will work with python 2.5 --> 2.7 and 3.2 --> 3.4. Python
3.0 and 3.1 may also work, but pypiserver is not being tested with
these versions.
Run the following commands to get your PyPI server up and running::
## Installation.
pip install pypiserver
mkdir ~/packages
# copy some source packages or eggs to this directory
pypi-server -p 8080 ~/packages
mkdir ~/packages ## Copy packages/wheels/eggs to this directory.
## Start server.
pypi-server -p 8080 ~/packages &
## Install hosted packages.
pip install --extra-index-url http://localhost:8080/simple/ ...
.. NOTE::
You can even install the latest *pypiserver* directly from github with this command,
assuming you have *git* installed on your `PATH`::
pip install git+git://github.com/pypiserver/pypiserver.git
.. Note::
The above commands do work on an unix like operating system with a
posix shell. If you're using windows, you'll have to run their
'windows counterparts'. The same is true for the rest of this
documentation.
Alternative Installation as standalone script
=============================================
The git repository contains a 'pypi-server-standalone.py' script,
The git repository contains a ``pypi-server-standalone.py`` script,
which is a single python file ready to be executed without any other
dependencies.
Run the following commands to download the script with wget::
Run the following commands to download the script with `wget`::
wget https://raw.github.com/schmir/pypiserver/standalone/pypi-server-standalone.py
wget https://raw.github.com/pypiserver/pypiserver/standalone/pypi-server-standalone.py
chmod +x pypi-server-standalone.py
or with curl::
or with `curl`::
curl -O https://raw.github.com/schmir/pypiserver/standalone/pypi-server-standalone.py
curl -O https://raw.github.com/pypiserver/pypiserver/standalone/pypi-server-standalone.py
chmod +x pypi-server-standalone.py
The server can then be started with::
@ -62,12 +74,14 @@ The server can then be started with::
Feel free to rename the script and move it into your $PATH.
Running on heroku/dotcloud
=================================
https://github.com/dexterous/pypiserver-on-the-cloud contains
instructions on how to run pypiserver on one of the supported cloud
service providers.
Detailed Usage
=================================
pypi-server -h will print a detailed usage message::
@ -125,6 +139,10 @@ pypi-server -h will print a detailed usage message::
-v
enable INFO logging; repeate for more verbosity.
--log-conf <FILE>
read logging configuration from FILE.
By default, configuration is read from `log.conf` if found in server's dir.
--log-file <FILE>
write logging info into this FILE.
@ -180,10 +198,10 @@ cumbersome. Since pypi-server redirects pip/easy_install to the
pypi.python.org index if it doesn't have a requested package, it's a
good idea to configure them to always use your local pypi index.
pip
`pip`
-----
For *pip* this can be done by setting the environment variable
PIP_EXTRA_INDEX_URL in your .bashrc/.profile/.zshrc::
`PIP_EXTRA_INDEX_URL` in your `.bashrc`/`.profile`/`.zshrc`::
export PIP_EXTRA_INDEX_URL=http://localhost:8080/simple/
@ -198,32 +216,32 @@ or by adding the following lines to ~/.pip/pip.conf::
the '--trusted-host` option. You can include this option permanently
in your configuration-files or environment variables.
easy_install
------------
For easy_install it can be configured with the following setting in
~/.pydistutils.cfg::
`easy_install`
--------------
For *easy_install* it can be configured with the following setting in
`~/.pydistutils.cfg`::
[easy_install]
index_url = http://localhost:8080/simple/
Uploads via setup.py upload
===========================
Uploading packages via `python setup.py upload` is also
possible. First make sure you have the passlib module installed::
Uploads via `setup.py` upload
=============================
Uploading packages via ``python setup.py upload`` is also
possible. First make sure you have the *passlib* module installed::
pip install passlib
Then create a apache htpassword file with::
Then create a apache *htpassword* file with::
htpasswd -sc .htaccess myusername
You'll be prompted for a password. You'll need to restart the server
with the -P option::
with the `-P` option::
pypi-server -p 8080 -P /path/to/.htaccess /path/to/private_pypi_folder/
Edit or create a ~/.pypirc file with the following content::
Edit or create a `~/.pypirc` file with the following content::
[distutils]
index-servers =
@ -246,13 +264,14 @@ Uploading then works by running::
Managing the package directory
==============================
pypi-server's -U option makes it possible to search for updates of
The `pypi-server` command has the `-U` option that searches for updates of
available packages. It scans the package directory for available
packages and searches on pypi.python.org for updates. Without further
options 'pypi-server -U' will just print a list of commands which must
options ``pypi-server -U`` will just print a list of commands which must
be run in order to get the latest version of each package. Output
looks like::
$ ./pypi-server -U
checking 106 packages for newer version
.........u.e...........e..u.............
@ -268,26 +287,22 @@ looks like::
pip -q install --no-deps --extra-index-url http://pypi.python.org/simple -d /home/ralf/packages/mirror greenlet==0.3.4
It first prints for each package a single character after checking the
available versions on pypi. A dot means the package is up-to-date, 'u'
means the package can be updated and 'e' means the list of releases on
pypi is empty. After that it show a pip command line which can be used
available versions on pypi. A dot(`.`) means the package is up-to-date, `u`
means the package can be updated and `e` means the list of releases on
pypi is empty. After that it shows a *pip* command line which can be used
to update a one package. Either copy and paste that or run
"pypi-server -Ux" in order to really execute those commands. You need
to have pip installed for that to work however.
``pypi-server -Ux`` in order to really execute those commands. You need
to have *pip* installed for that to work however.
Specifying an additional '-u' option will also allow alpha, beta and
Specifying an additional `-u` option will also allow alpha, beta and
release candidates to be downloaded. Without this option these
releases won't be considered.
Optional dependencies
=====================
- pypiserver ships with it's own copy of bottle. It's possible to use
bottle with different WSGI servers. pypiserver chooses any of the
following paste, cherrypy, twisted, wsgiref (part of python) if
available.
- pypiserver relies on the passlib module for parsing apache htpasswd
files. You need to install it, when using the -P, --passwords
*pypiserver* relies on the *passlib* module for parsing apache htpasswd
files. You need to install it, when using the `-P`, `--passwords`
option. The following command will do that::
pip install passlib
@ -295,23 +310,31 @@ Optional dependencies
Using a different WSGI server
=============================
If none of the above servers matches your needs, pypiserver also
- *pypiserver* ships with it's own copy of bottle.
It's possible to use bottle with different WSGI servers.
- *pypiserver* chooses any of the
following *paste*, *cherrypy*, *twisted*, *wsgiref* (part of python) if
available.
- If none of the above servers matches your needs, pypiserver also
exposes an API to get the internal WSGI app, which you can then run
under any WSGI server you like. pypiserver.app has the following
under any WSGI server you like. `pypiserver.app` has the following
interface::
def app(root=None,
redirect_to_fallback=True,
fallback_url="http://pypi.python.org/simple")
and returns the WSGI application. root is the package directory,
redirect_to_fallback specifies whether to redirect to fallback_url when
and returns the WSGI application. `root` is the package directory,
`redirect_to_fallback` specifies whether to redirect to `fallback_url` when
a package is missing.
gunicorn
----------------
The following command uses gunicorn to start pypiserver::
gunicorn
--------
The following command uses *gunicorn* to start *pypiserver*::
gunicorn -w4 'pypiserver:app("/home/ralf/packages")'
@ -321,8 +344,8 @@ or when using multiple roots::
apache/mod_wsgi
----------------
In case you're using apache 2 with mod_wsgi, the following config file
---------------
In case you're using *apache2* with *mod_wsgi*, the following config-file
(contributed by Thomas Waldmann) can be used::
# An example pypiserver.wsgi for use with apache2 and mod_wsgi, edit as necessary.
@ -339,9 +362,10 @@ In case you're using apache 2 with mod_wsgi, the following config file
import pypiserver
application = pypiserver.app(PACKAGES, redirect_to_fallback=True, password_file=HTPASSWD)
paste/pastedeploy
----------------------
paste allows to run multiple WSGI applications under different URL
-----------------
*paste* allows to run multiple WSGI applications under different URL
paths. Therefore it's possible to serve different set of packages on
different paths.
@ -369,8 +393,7 @@ unstable packages on different paths::
workers = 5
accesslog = -
.. NOTE::
.. Note::
You need to install some more dependencies for this to work,
e.g. run::
@ -382,17 +405,17 @@ unstable packages on different paths::
Source
===========
Sources
=======
Source releases can be downloaded from
https://pypi.python.org/pypi/pypiserver
https://github.com/schmir/pypiserver carries a git repository of the
https://github.com/pypiserver/pypiserver carries a git repository of the
in-development version.
Use::
git clone https://github.com/schmir/pypiserver.git
git clone https://github.com/pypiserver/pypiserver.git
to create a copy of the repository, then::
@ -402,28 +425,30 @@ inside the copy to receive the latest version.
Bugs
=============
pypiserver does not implement the full API as seen on PyPI_. It
implements just enough to make easy_install and pip install work.
====
*pypiserver* does not implement the full API as seen on PyPI_. It
implements just enough to make *easy_install* and *pip* install work.
The following limitations are known:
- pypiserver doesn't implement the XMLRPC interface: pip search
- It doesn't implement the XMLRPC interface: pip search
will not work.
- pypiserver doesn't implement the json based '/pypi' interface.
- pypiserver accepts documentation uploads but does not save them to
disk (see https://github.com/schmir/pypiserver/issues/47 for a
- It doesn't implement the json based '/pypi' interface.
- It accepts documentation uploads but does not save them to
disk (see https://github.com/pypiserver/pypiserver/issues/47 for a
discussion)
- It does not handle misspelled packages as pypi-repo does,
therefore it is suggested to use it with `--extra-index-url` instead
of `--index-url` (see discussion at https://github.com/pypiserver/pypiserver/issues/38)
Please use github's bugtracker
https://github.com/schmir/pypiserver/issues if you find any other
bugs.
Please use github's `bugtracker <https://github.com/pypiserver/pypiserver/issues>`_
if you find any other bugs.
License
=============
pypiserver contains a copy of bottle_ which is available under the
MIT license::
=======
*pypiserver* contains a copy of bottle_ which is available under the
*MIT* license::
Copyright (c) 2012, Marcel Hellkamp.
@ -446,7 +471,7 @@ MIT license::
SOFTWARE.
The remaining part is distributed under the zlib/libpng license::
The remaining part is distributed under the *zlib/libpng* license::
Copyright (c) 2011-2014 Ralf Schmitt
@ -471,22 +496,25 @@ The remaining part is distributed under the zlib/libpng license::
Similar Projects
====================
================
There are lots of other projects, which allow you to run your own
PyPI server. If pypiserver doesn't work for you, try one of the
following alternatives:
PyPI server. If *pypiserver* doesn't work for you, the following are
among the most popular alternatives:
devpi-server (https://pypi.python.org/pypi/devpi-server)
*devpi-server* (https://pypi.python.org/pypi/devpi-server)
easy-to-use caching proxy server
proxypypi (https://pypi.python.org/pypi/proxypypi)
*proxypypi* (https://pypi.python.org/pypi/proxypypi)
a PyPI caching proxy
Changelog
=========
1.1.7 (2015-02-23)
1.1.7 (2015-02-28)
------------------
1st release under cooperative ownership:
- #65, #66: Improve Auth for private repos by supporting i
password protected package listings and downloads,
in addition to uploads (use the -a, --authenticate option
@ -497,6 +525,8 @@ Changelog
- #61: Possible to change welcome-msg.
- #77, #78: Avoid XSS by generating web-content with SimpleTemplate
instead of python's string-substs.
- #38: Instruct to use --extra-index-url for misspelled dependencies to work.
1.1.6 (2014-03-05)
------------------
@ -515,7 +545,7 @@ Changelog
1.1.4 (2014-01-03)
------------------
- make pypiserver compatible with pip 1.5
(https://github.com/schmir/pypiserver/pull/42)
(https://github.com/pypiserver/pypiserver/pull/42)
1.1.3 (2013-07-22)
------------------
@ -550,9 +580,9 @@ Changelog
------------------
- make 'pypi-server -Ux' work on windows
('module' object has no attribute 'spawnlp',
https://github.com/schmir/pypiserver/issues/26)
https://github.com/pypiserver/pypiserver/issues/26)
- use absolute paths in hrefs for root view
(https://github.com/schmir/pypiserver/issues/25)
(https://github.com/pypiserver/pypiserver/issues/25)
- add description of uploads to the documentation
- make the test suite work on python 3
- make pypi-server-standalone work with python 2.5

@ -4,7 +4,7 @@
<p> To use this server with pip, run the the following command:
<blockquote><pre>
pip install -i {{URL}}simple/ PACKAGE [PACKAGE2...]
pip install --extra-index-url {{URL}}simple/ PACKAGE [PACKAGE2...]
</pre></blockquote></p>
<p> To use this server with easy_install, run the the following command:

@ -33,9 +33,9 @@ setup(name="pypiserver",
version=get_version(),
packages=["pypiserver"],
package_data={'pypiserver': ['welcome.html']},
url="https://github.com/schmir/pypiserver",
maintainer="Ralf Schmitt",
maintainer_email="ralf@systemexit.de",
url="https://github.com/pypiserver/pypiserver",
maintainer="Ralf Schmitt, Kostis Anagnostopoulos",
maintainer_email="ralf@systemexit.de, ankostis@gmail.com",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
@ -43,6 +43,10 @@ setup(name="pypiserver",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: BSD License",
"License :: OSI Approved :: zlib/libpng License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.5",
"Programming Language :: Python :: 2.6",

@ -236,7 +236,7 @@ def test_nonroot_simple_packages(root, testpriv):
def test_root_no_relative_paths(testpriv):
"""https://github.com/schmir/pypiserver/issues/25"""
"""https://github.com/pypiserver/pypiserver/issues/25"""
resp = testpriv.get("/priv/")
hrefs = [x["href"] for x in resp.html("a")]
assert hrefs == ['/priv/packages/', '/priv/simple/', 'http://pypi.python.org/pypi/pypiserver']