public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-admin/gixy/, app-admin/gixy/files/
@ 2021-11-11 10:26 Michał Górny
  0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2021-11-11 10:26 UTC (permalink / raw
  To: gentoo-commits

commit:     5efec68e8204b9055637ae490bd959700f69391b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 11 10:22:59 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Nov 11 10:26:49 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5efec68e

app-admin/gixy: Eliminate dev-python/cached-property dep

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 app-admin/gixy/files/gixy-0.1.20-backports.patch   | 76 ++++++++++++++++++++++
 .../{gixy-0.1.20.ebuild => gixy-0.1.20-r1.ebuild}  | 11 ++--
 2 files changed, 80 insertions(+), 7 deletions(-)

diff --git a/app-admin/gixy/files/gixy-0.1.20-backports.patch b/app-admin/gixy/files/gixy-0.1.20-backports.patch
new file mode 100644
index 00000000000..36c9cb69357
--- /dev/null
+++ b/app-admin/gixy/files/gixy-0.1.20-backports.patch
@@ -0,0 +1,76 @@
+diff --git a/gixy/core/regexp.py b/gixy/core/regexp.py
+index 7a96187..f360604 100644
+--- a/gixy/core/regexp.py
++++ b/gixy/core/regexp.py
+@@ -3,7 +3,11 @@ import logging
+ import re
+ import random
+ import itertools
+-from cached_property import cached_property
++
++try:
++    from functools import cached_property
++except ImportError:
++    from cached_property import cached_property
+ 
+ import gixy.core.sre_parse.sre_parse as sre_parse
+ 
+diff --git a/gixy/directives/block.py b/gixy/directives/block.py
+index 5e5b1ed..cc9bcb0 100644
+--- a/gixy/directives/block.py
++++ b/gixy/directives/block.py
+@@ -1,4 +1,7 @@
+-from cached_property import cached_property
++try:
++    from functools import cached_property
++except ImportError:
++    from cached_property import cached_property
+ 
+ from gixy.directives.directive import Directive
+ from gixy.core.variable import Variable
+diff --git a/gixy/parser/raw_parser.py b/gixy/parser/raw_parser.py
+index 6a30b7f..0f43308 100644
+--- a/gixy/parser/raw_parser.py
++++ b/gixy/parser/raw_parser.py
+@@ -1,7 +1,11 @@
+ import logging
+ import codecs
+ import six
+-from cached_property import cached_property
++
++try:
++    from functools import cached_property
++except ImportError:
++    from cached_property import cached_property
+ 
+ from pyparsing import (
+     Literal, Suppress, White, Word, alphanums, Forward, Group, Optional, Combine,
+diff --git a/requirements.txt b/requirements.txt
+index dbf6d5f..47a1b54 100644
+--- a/requirements.txt
++++ b/requirements.txt
+@@ -1,6 +1,6 @@
+ pyparsing>=1.5.5
+-cached-property>=1.2.0
++cached-property>=1.2.0;python_version<"3.8"
+ argparse>=1.4.0
+ six>=1.1.0
+ Jinja2>=2.8
+-ConfigArgParse>=0.11.0
+\ No newline at end of file
++ConfigArgParse>=0.11.0
+diff --git a/setup.py b/setup.py
+index e4314a6..e57842b 100644
+--- a/setup.py
++++ b/setup.py
+@@ -18,8 +18,8 @@ setup(
+     url='https://github.com/yandex/gixy',
+     install_requires=[
+         'pyparsing>=1.5.5',
+-        'cached-property>=1.2.0',
+-        'argparse>=1.4.0',
++        'cached-property>=1.2.0;python_version<"3.8"',
++        'argparse>=1.4.0;python_version<"3.2"',
+         'six>=1.1.0',
+         'Jinja2>=2.8',
+         'ConfigArgParse>=0.11.0'

diff --git a/app-admin/gixy/gixy-0.1.20.ebuild b/app-admin/gixy/gixy-0.1.20-r1.ebuild
similarity index 80%
rename from app-admin/gixy/gixy-0.1.20.ebuild
rename to app-admin/gixy/gixy-0.1.20-r1.ebuild
index a8d8b10d8ad..806f1911153 100644
--- a/app-admin/gixy/gixy-0.1.20.ebuild
+++ b/app-admin/gixy/gixy-0.1.20-r1.ebuild
@@ -1,10 +1,9 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 PYTHON_COMPAT=( python3_{8..10} )
-
 inherit distutils-r1
 
 DESCRIPTION="Nginx configuration static analyzer"
@@ -18,14 +17,12 @@ KEYWORDS="~amd64 ~x86"
 
 RDEPEND="
 	>=dev-python/pyparsing-1.5.5[${PYTHON_USEDEP}]
-	>=dev-python/cached-property-1.2.0[${PYTHON_USEDEP}]
 	>=dev-python/configargparse-0.11.0[${PYTHON_USEDEP}]
 	>=dev-python/jinja-2.8[${PYTHON_USEDEP}]
 	>=dev-python/six-1.1.0[${PYTHON_USEDEP}]"
 
 distutils_enable_tests nose
 
-python_prepare_all() {
-	sed -i -e "/argparse/d" setup.py || die
-	distutils-r1_python_prepare_all
-}
+PATCHES=(
+	"${FILESDIR}"/${P}-backports.patch
+)


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-11 10:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-11 10:26 [gentoo-commits] repo/gentoo:master commit in: app-admin/gixy/, app-admin/gixy/files/ Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox