diff options
Diffstat (limited to 'contrib/python/podman')
-rw-r--r-- | contrib/python/podman/Makefile | 16 | ||||
-rw-r--r-- | contrib/python/podman/README.md | 7 | ||||
-rw-r--r-- | contrib/python/podman/podman/__init__.py | 4 | ||||
-rw-r--r-- | contrib/python/podman/podman/libs/errors.py | 4 | ||||
-rw-r--r-- | contrib/python/podman/requirements.txt | 6 | ||||
-rw-r--r-- | contrib/python/podman/setup.py | 14 |
6 files changed, 30 insertions, 21 deletions
diff --git a/contrib/python/podman/Makefile b/contrib/python/podman/Makefile index ea40cccac..0a0804566 100644 --- a/contrib/python/podman/Makefile +++ b/contrib/python/podman/Makefile @@ -2,7 +2,11 @@ PYTHON ?= /usr/bin/python3 .PHONY: python-podman python-podman: - $(PYTHON) setup.py bdist + $(PYTHON) setup.py sdist bdist + +.PHONY: lint +lint: + $(PYTHON) -m pylint podman .PHONY: integration integration: @@ -10,12 +14,18 @@ integration: .PHONY: install install: - $(PYTHON) setup.py install --user + $(PYTHON) setup.py install + +.PHONY: clobber +clobber: uninstall clean + +.PHONY: uninstall +uninstall: + $(PYTHON) -m pip uninstall --yes podman ||: .PHONY: clean clean: $(PYTHON) setup.py clean --all - pip3 uninstall podman ||: rm -rf podman.egg-info dist find . -depth -name __pycache__ -exec rm -rf {} \; find . -depth -name \*.pyc -exec rm -f {} \; diff --git a/contrib/python/podman/README.md b/contrib/python/podman/README.md index fad03fd27..ec4a0480b 100644 --- a/contrib/python/podman/README.md +++ b/contrib/python/podman/README.md @@ -6,11 +6,12 @@ See [libpod](https://github.com/projectatomic/libpod) ## Releases -To build the podman egg: +To build the podman egg and install as user: ```sh -cd ~/libpod/contrib/python -python3 setup.py clean -a && python3 setup.py bdist +cd ~/libpod/contrib/python/podman +python3 setup.py clean -a && python3 setup.py sdist bdist +python3 setup.py install --user ``` ## Code snippets/examples: diff --git a/contrib/python/podman/podman/__init__.py b/contrib/python/podman/podman/__init__.py index 5a0356311..ec4775178 100644 --- a/contrib/python/podman/podman/__init__.py +++ b/contrib/python/podman/podman/__init__.py @@ -4,7 +4,7 @@ import pkg_resources from .client import Client from .libs import datetime_format, datetime_parse from .libs.errors import (ContainerNotFound, ErrorOccurred, ImageNotFound, - RuntimeError) + PodmanError) try: __version__ = pkg_resources.get_distribution('podman').version @@ -18,5 +18,5 @@ __all__ = [ 'datetime_parse', 'ErrorOccurred', 'ImageNotFound', - 'RuntimeError', + 'PodmanError', ] diff --git a/contrib/python/podman/podman/libs/errors.py b/contrib/python/podman/podman/libs/errors.py index b98210481..3d2300e39 100644 --- a/contrib/python/podman/podman/libs/errors.py +++ b/contrib/python/podman/podman/libs/errors.py @@ -43,7 +43,7 @@ class ErrorOccurred(VarlinkErrorProxy): pass -class RuntimeError(VarlinkErrorProxy): +class PodmanError(VarlinkErrorProxy): """Raised when Client fails to connect to runtime.""" pass @@ -53,7 +53,7 @@ error_map = { 'io.projectatomic.podman.ContainerNotFound': ContainerNotFound, 'io.projectatomic.podman.ErrorOccurred': ErrorOccurred, 'io.projectatomic.podman.ImageNotFound': ImageNotFound, - 'io.projectatomic.podman.RuntimeError': RuntimeError, + 'io.projectatomic.podman.RuntimeError': PodmanError, } diff --git a/contrib/python/podman/requirements.txt b/contrib/python/podman/requirements.txt index d294af3c7..5a936e7d5 100644 --- a/contrib/python/podman/requirements.txt +++ b/contrib/python/podman/requirements.txt @@ -1,3 +1,3 @@ -varlink>=26.1.0 -setuptools>=39.2.0 -python-dateutil>=2.7.3 +python-dateutil +setuptools>=39 +varlink diff --git a/contrib/python/podman/setup.py b/contrib/python/podman/setup.py index c9db30199..a342c05fd 100644 --- a/contrib/python/podman/setup.py +++ b/contrib/python/podman/setup.py @@ -15,24 +15,22 @@ with open(os.path.join(root, 'requirements.txt')) as r: setup( name='podman', version=os.environ.get('PODMAN_VERSION', '0.0.0'), - description='A client for communicating with a Podman server', - long_description=readme, + description='A library for communicating with a Podman server', author='Jhon Honce', author_email='jhonce@redhat.com', - url='http://github.com/projectatomic/libpod', license='Apache Software License', - python_requires='>=3', + long_description=readme, include_package_data=True, install_requires=requirements, packages=find_packages(exclude=['test']), + python_requires='>=3', zip_safe=True, + url='http://github.com/projectatomic/libpod', keywords='varlink libpod podman', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', - 'Topic :: Software Development', 'License :: OSI Approved :: Apache Software License', - 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.4', + 'Topic :: Software Development', ]) -# Not supported -# long_description_content_type='text/markdown', |