From d07cc8507c36c3b8535a1500dfb1dcc04e175c65 Mon Sep 17 00:00:00 2001 From: werwty Date: Tue, 8 May 2018 13:35:54 -0400 Subject: [PATCH] Prepare setup.py for release Update tests to account for smash changes https://github.com/PulpQE/pulp-smash/pull/993 --- MANIFEST.in | 1 + .../tests/functional/api_v3/test_orphans.py | 4 ++-- .../tests/functional/api_v3/test_publish.py | 8 ++++---- .../functional/api_v3/test_repo_version.py | 4 ++-- setup.py | 20 ++++++++++++++++--- 5 files changed, 26 insertions(+), 11 deletions(-) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 000000000..1aba38f67 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include LICENSE diff --git a/pulp_python/tests/functional/api_v3/test_orphans.py b/pulp_python/tests/functional/api_v3/test_orphans.py index ffd9549d8..e130c37e3 100644 --- a/pulp_python/tests/functional/api_v3/test_orphans.py +++ b/pulp_python/tests/functional/api_v3/test_orphans.py @@ -5,7 +5,7 @@ from pulp_smash import api, cli, config, utils from pulp_smash.exceptions import CalledProcessError from pulp_smash.tests.pulp3.constants import ARTIFACTS_PATH, REPO_PATH -from pulp_smash.tests.pulp3.utils import (get_auth, get_content, get_version_hrefs, # noqa +from pulp_smash.tests.pulp3.utils import (get_auth, get_content, get_versions, # noqa delete_orphans, delete_version, sync) from pulp_smash.tests.pulp3.pulpcore.utils import gen_repo @@ -76,7 +76,7 @@ def test_clean_orphan_content_unit(self): # Delete first repo version. The previous removed content unit will be # an orphan. - delete_version(repo, get_version_hrefs(repo)[0]) + delete_version(repo, get_versions(repo)[0]['_href']) content_units = self.api_client.get(PYTHON_CONTENT_PATH)['results'] self.assertIn(content, content_units) delete_orphans() diff --git a/pulp_python/tests/functional/api_v3/test_publish.py b/pulp_python/tests/functional/api_v3/test_publish.py index bf97bbbfd..94fa45c86 100644 --- a/pulp_python/tests/functional/api_v3/test_publish.py +++ b/pulp_python/tests/functional/api_v3/test_publish.py @@ -6,7 +6,7 @@ from pulp_smash import api, config, utils from pulp_smash.tests.pulp3.constants import REPO_PATH -from pulp_smash.tests.pulp3.utils import get_auth, get_version_hrefs, sync, publish +from pulp_smash.tests.pulp3.utils import get_auth, get_versions, sync, publish from pulp_smash.tests.pulp3.pulpcore.utils import gen_repo from pulp_python.tests.functional.constants import (PYTHON_CONTENT_PATH, PYTHON_PYPI_URL, @@ -58,14 +58,14 @@ def test_all(self): repo['_versions_href'], {'add_content_units': [file_content['_href']]} ) - versions = get_version_hrefs(repo) - non_latest = choice(versions[:-1]) + versions = get_versions(repo) + non_latest = choice(versions[:-1])['_href'] # Step 2 publication = publish(cfg, publisher, repo) # Step 3 - self.assertEqual(publication['repository_version'], versions[-1]) + self.assertEqual(publication['repository_version'], versions[-1]['_href']) # Step 4 publication = publish(cfg, publisher, repo, non_latest) diff --git a/pulp_python/tests/functional/api_v3/test_repo_version.py b/pulp_python/tests/functional/api_v3/test_repo_version.py index da536fcb0..c99cdf23b 100644 --- a/pulp_python/tests/functional/api_v3/test_repo_version.py +++ b/pulp_python/tests/functional/api_v3/test_repo_version.py @@ -8,7 +8,7 @@ from pulp_smash.tests.pulp3.constants import REPO_PATH from pulp_smash.tests.pulp3.utils import ( get_auth, get_artifact_paths, get_content, get_added_content, get_removed_content, - get_version_hrefs, sync, publish, delete_version + get_versions, sync, publish, delete_version ) from pulp_smash.tests.pulp3.pulpcore.utils import gen_repo @@ -227,7 +227,7 @@ def setUp(self): {'add_content_units': [content['_href']]} ) self.repo = self.client.get(self.repo['_href']) - self.repo_versions = get_version_hrefs(self.repo) + self.repo_versions = get_versions(self.repo) def test_delete_first_version(self): """Delete the first repository version.""" diff --git a/setup.py b/setup.py index ded5d4dda..a39fe6744 100644 --- a/setup.py +++ b/setup.py @@ -1,23 +1,37 @@ #!/usr/bin/env python3 -from setuptools import setup +from setuptools import setup, find_packages requirements = [ 'pulpcore-plugin', 'pkginfo' ] +with open('README.rst') as f: + long_description = f.read() + setup( name='pulp-python', - version='3.0.0b1.dev0', + version='3.0.0b1', description='pulp-python plugin for the Pulp Project', + long_description=long_description, license='GPLv2+', author='Pulp Project Developers', author_email='pulp-list@redhat.com', url='http://www.pulpproject.org', install_requires=requirements, include_package_data=True, - packages=['pulp_python', 'pulp_python.app'], + packages=find_packages(exclude=['tests']), + classifiers=( + 'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)', + 'Operating System :: POSIX :: Linux', + 'Development Status :: 4 - Beta', + 'Framework :: Django', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + ), entry_points={ 'pulpcore.plugin': [ 'pulp_python = pulp_python:default_app_config',