* [gentoo-commits] repo/gentoo:master commit in: dev-python/chardet/files/
@ 2017-04-22 20:51 Zac Medico
0 siblings, 0 replies; only message in thread
From: Zac Medico @ 2017-04-22 20:51 UTC (permalink / raw
To: gentoo-commits
commit: d0a97429c4ec66b4d79114a3ba082c4275bcd193
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 22 20:48:20 2017 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Apr 22 20:51:55 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0a97429
dev-python/chardet: sync pytest-runner patch with upstream
Package-Manager: Portage-2.3.5, Repoman-2.3.2
.../chardet/files/disable-pytest-runner.patch | 36 +++++++++++++++++-----
1 file changed, 28 insertions(+), 8 deletions(-)
diff --git a/dev-python/chardet/files/disable-pytest-runner.patch b/dev-python/chardet/files/disable-pytest-runner.patch
index 42869a4b481..affbc134148 100644
--- a/dev-python/chardet/files/disable-pytest-runner.patch
+++ b/dev-python/chardet/files/disable-pytest-runner.patch
@@ -1,21 +1,41 @@
-From 8d5291ff2c2560cf88ef7c38d90ca6d026c9d11c Mon Sep 17 00:00:00 2001
-From: Mike Gilbert <floppym@gentoo.org>
-Date: Thu, 20 Apr 2017 15:18:35 -0400
-Subject: [PATCH] Remove dependency on pytest-runner
+From b874c25b08edd6bdbdd70a439c6cd603d6830226 Mon Sep 17 00:00:00 2001
+From: Zac Medico <zmedico@gentoo.org>
+Date: Fri, 21 Apr 2017 08:36:14 -0700
+Subject: [PATCH] setup.py: require pytest-runner only when necessary (#119)
+This optimizes setup.py for cases when pytest-runner is not needed,
+using the approach that is suggested upstream:
+
+https://pypi.python.org/pypi/pytest-runner#conditional-requirement
---
- setup.py | 1 -
- 1 file changed, 1 deletion(-)
+ setup.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
-index 28a080a..ab49d62 100755
+index 28a080a..c214352 100755
--- a/setup.py
+++ b/setup.py
-@@ -46,7 +46,6 @@ setup(name='chardet',
+@@ -1,9 +1,14 @@
+ #!/usr/bin/env python
+ import re
++import sys
+
+ from setuptools import find_packages, setup
+
+
++needs_pytest = set(['pytest', 'test', 'ptr']).intersection(sys.argv)
++pytest_runner = ['pytest-runner'] if needs_pytest else []
++
++
+ # Get version without importing, which avoids dependency issues
+ def get_version():
+ with open('chardet/version.py') as version_file:
+@@ -46,7 +51,7 @@ setup(name='chardet',
"Modules"),
"Topic :: Text Processing :: Linguistic"],
packages=find_packages(),
- setup_requires=['pytest-runner'],
++ setup_requires=pytest_runner,
tests_require=['pytest', 'hypothesis'],
entry_points={'console_scripts':
['chardetect = chardet.cli.chardetect:main']})
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-04-22 20:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-22 20:51 [gentoo-commits] repo/gentoo:master commit in: dev-python/chardet/files/ Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox