public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Patrick McLean" <chutzpah@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pypiserver/, dev-python/pypiserver/files/
Date: Fri, 22 Nov 2019 03:15:26 +0000 (UTC)	[thread overview]
Message-ID: <1574392516.cb8abb6747ebf933a099d7b2c9301ead51a9febf.chutzpah@gentoo> (raw)

commit:     cb8abb6747ebf933a099d7b2c9301ead51a9febf
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Fri Nov 22 02:55:05 2019 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Nov 22 03:15:16 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb8abb67

dev-python/pypiserver: New package

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-python/pypiserver/Manifest                     |  1 +
 .../files/pypiserver-1.3.1-no-internet.patch       | 90 ++++++++++++++++++++++
 dev-python/pypiserver/metadata.xml                 | 12 +++
 dev-python/pypiserver/pypiserver-1.3.1.ebuild      | 39 ++++++++++
 4 files changed, 142 insertions(+)

diff --git a/dev-python/pypiserver/Manifest b/dev-python/pypiserver/Manifest
new file mode 100644
index 00000000000..72fb33b1997
--- /dev/null
+++ b/dev-python/pypiserver/Manifest
@@ -0,0 +1 @@
+DIST pypiserver-1.3.1.tar.gz 504875 BLAKE2B 18089a1d18ace55038fb2b114a3402ce1352139a858a2e32399ad36ef0cbe5dfcf9bbdb865807ea84330405bdd4da1c00265e095b7299fe2b9f56150d573f7d9 SHA512 425a557eb74111fb07911cacd275dfa35b8e8ba5e9f230ca5f86500c10b2ab33235eb3376150c75972de3d8ebd85b03ecdf935753b0af46936a78311d5f174a7

diff --git a/dev-python/pypiserver/files/pypiserver-1.3.1-no-internet.patch b/dev-python/pypiserver/files/pypiserver-1.3.1-no-internet.patch
new file mode 100644
index 00000000000..2df183f6404
--- /dev/null
+++ b/dev-python/pypiserver/files/pypiserver-1.3.1-no-internet.patch
@@ -0,0 +1,90 @@
+diff --git a/tests/test_app.py b/tests/test_app.py
+index 52ce234..46cd23a 100644
+--- a/tests/test_app.py
++++ b/tests/test_app.py
+@@ -2,6 +2,7 @@
+ 
+ # Builtin imports
+ import logging
++import unittest
+ 
+ 
+ try:  # python 3
+@@ -177,6 +178,7 @@ def test_favicon(testapp):
+     testapp.get("/favicon.ico", status=404)
+ 
+ 
++@unittest.skip("Requires internet access")
+ def test_fallback(root, _app, testapp):
+     assert _app.config.redirect_to_fallback
+     resp = testapp.get("/simple/pypiserver/", status=302)
+diff --git a/tests/test_manage.py b/tests/test_manage.py
+index 9735ac6..bde267d 100755
+--- a/tests/test_manage.py
++++ b/tests/test_manage.py
+@@ -118,6 +118,7 @@ def test_pip_cmd_root(pip_ver, cmd_type):
+     assert tuple(PipCmd.update_root(pip_ver)) == exp_cmd
+ 
+ 
++@pytest.mark.skip(reason="Requires internet access")
+ def test_pip_cmd_update():
+     """Verify the correct determination of a pip command."""
+     index = 'https://pypi.org/simple'
+@@ -138,6 +139,7 @@ def test_pip_cmd_update():
+     )
+ 
+ 
++@pytest.mark.skip(reason="Requires internet access")
+ def test_pip_cmd_update_index_overridden():
+     """Verify the correct determination of a pip command."""
+     index = 'https://pypi.org/complex'
+@@ -156,6 +158,7 @@ def test_pip_cmd_update_index_overridden():
+     )
+ 
+ 
++@pytest.mark.skip(reason="Requires internet access")
+ def test_update_package(monkeypatch):
+     """Test generating an update command for a package."""
+     monkeypatch.setattr(manage, 'call', Mock())
+diff --git a/tests/test_server.py b/tests/test_server.py
+index 6cb4bc4..6325b6f 100644
+--- a/tests/test_server.py
++++ b/tests/test_server.py
+@@ -275,7 +275,6 @@ def twine_register(packages, repository='test', conf='pypirc',
+ # Tests
+ # ######################################################################
+ 
+-
+ def test_pipInstall_packageNotFound(empty_packdir, port, pipdir, package):
+     with new_server(empty_packdir, port):
+         cmd = "centodeps"
+@@ -283,18 +282,21 @@ def test_pipInstall_packageNotFound(empty_packdir, port, pipdir, package):
+         assert not pipdir.listdir()
+ 
+ 
++@pytest.mark.skip(reason="Needs internet")
+ def test_pipInstall_openOk(open_server, package, pipdir):
+     cmd = "centodeps"
+     assert _run_pip_install(cmd, open_server.port, pipdir) == 0
+     assert pipdir.join(package.basename).check()
+ 
+ 
++@pytest.mark.skip(reason="Needs internet")
+ def test_pipInstall_authedFails(protected_server, pipdir):
+     cmd = "centodeps"
+     assert _run_pip_install(cmd, protected_server.port, pipdir) != 0
+     assert not pipdir.listdir()
+ 
+ 
++@pytest.mark.skip(reason="Needs internet")
+ def test_pipInstall_authedOk(protected_server, package, pipdir):
+     cmd = "centodeps"
+     assert _run_pip_install(cmd, protected_server.port, pipdir,
+@@ -395,6 +397,7 @@ def test_twine_upload_open(empty_packdir, port, package):
+     assert len(empty_packdir.listdir()) == 1
+ 
+ 
++@pytest.mark.skip(reason="needs internet")
+ @pytest.mark.parametrize("hash_algo", ("md5", "sha256", "sha512"))
+ def test_hash_algos(empty_packdir, port, package, pipdir, hash_algo):
+     """Test twine upload with no authentication"""

diff --git a/dev-python/pypiserver/metadata.xml b/dev-python/pypiserver/metadata.xml
new file mode 100644
index 00000000000..e3205b37b69
--- /dev/null
+++ b/dev-python/pypiserver/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>python@gentoo.org</email>
+		<name>Python</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="pypi">pytest-services</remote-id>
+		<remote-id type="github">pytest-dev/pytest-services</remote-id>
+	</upstream>
+</pkgmetadata>

diff --git a/dev-python/pypiserver/pypiserver-1.3.1.ebuild b/dev-python/pypiserver/pypiserver-1.3.1.ebuild
new file mode 100644
index 00000000000..29f0c61101a
--- /dev/null
+++ b/dev-python/pypiserver/pypiserver-1.3.1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7} )
+inherit distutils-r1
+
+DESCRIPTION="Minimal PyPI server"
+HOMEPAGE="https://github.com/pypiserver/pypiserver"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="ZLIB MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+	>=dev-python/wheel-0.25.0[${PYTHON_USEDEP}]"
+BDEPEND="${RDEPEND}
+	dev-python/setuptools-git[${PYTHON_USEDEP}]
+	test? (
+		dev-python/passlib[${PYTHON_USEDEP}]
+		>=dev-python/pytest-2.3[${PYTHON_USEDEP}]
+		dev-python/tox[${PYTHON_USEDEP}]
+		dev-python/twine[${PYTHON_USEDEP}]
+		dev-python/webtest[${PYTHON_USEDEP}]
+	)"
+
+# tests need access to pypi.org
+#RESTRICT="test"
+
+PATCHES=(
+	"${FILESDIR}/pypiserver-1.3.1-no-internet.patch"
+)
+
+DOCS=( README.rst )
+
+distutils_enable_tests pytest


             reply	other threads:[~2019-11-22  3:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22  3:15 Patrick McLean [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-05-24  6:16 [gentoo-commits] repo/gentoo:master commit in: dev-python/pypiserver/, dev-python/pypiserver/files/ Michał Górny
2024-04-25 12:52 Michał Górny
2024-11-24  3:28 Michał Górny
2024-12-14 10:57 Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1574392516.cb8abb6747ebf933a099d7b2c9301ead51a9febf.chutzpah@gentoo \
    --to=chutzpah@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox