Ensured plugins are installed with package

* Used `find_packages()` in `setup.py` to ensure non-top-level packges
would also be installed
* Updated `.dockerignore` to include some other unnecessary items
* Updated `__main__.py` to not bomb when `update_packages` is not in the
`config` object (i.e. when using `pypiserver run`)
This commit is contained in:
Matthew Planchard 2018-07-26 19:26:56 -05:00
parent 5ea2a9eb5c
commit c10f31339d
6 changed files with 13 additions and 8 deletions

@ -13,6 +13,9 @@
.~
.DS_Store
.ropeproject
.cache
.pytest_cache
.standalone
ID
__pycache__/
/build/

@ -6,8 +6,7 @@ WORKDIR /code
RUN addgroup -S -g 9898 pypiserver && \
adduser -S -u 9898 -G pypiserver pypiserver && \
python setup.py install && \
pip install passlib && \
pip install .[passlib] && \
cd / && \
rm -rf /code && \
mkdir -p /data/packages && \
@ -21,5 +20,7 @@ USER pypiserver
WORKDIR /data
EXPOSE 8080
ENTRYPOINT ["pypi-server", "-p", "8080"]
CMD ["packages"]
ENV PYPISERVER_PORT=8080
ENTRYPOINT ["pypiserver"]
CMD ["run", "packages"]

@ -59,7 +59,7 @@ def _run_app_from_config(config):
level=config.verbosity, filename=config.log_file, frmt=config.log_frmt
)
if config.update_packages:
if hasattr(config, 'update_packages') and config.update_packages:
from pypiserver.manage import update_all_packages
update_all_packages(
config.roots,

@ -376,7 +376,7 @@ class Config(object):
cherrypy, twisted, gunicorn, gevent, wsgiref, auto. The
default is to use "auto" which chooses one of paste, cherrypy,
twisted or wsgiref
'''))
'''))
)
server.add_argument(
'--hash-algo',

@ -49,6 +49,7 @@ def _validate_roots(roots):
'{}'.format(root, repr(exc))
)
def _welcome_msg(welcome_file):
"""Parse the provided welcome file to get the welcome message."""
try:

@ -4,7 +4,7 @@
from os import path
import sys
from setuptools import setup
from setuptools import find_packages, setup
tests_require = ['pytest>=2.3', 'tox', 'twine', 'pip>=7',
@ -37,7 +37,7 @@ setup(
description="A minimal PyPI server for use with pip/easy_install.",
long_description=open("README.rst").read(),
version=get_version(),
packages=["pypiserver"],
packages=find_packages(exclude=('tests', 'tests.*')),
package_data={'pypiserver': ['welcome.html']},
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
setup_requires=setup_requires,