@s-t-e-v-e-n-k commented on this pull request.
> @@ -143,10 +201,30 @@ def convert(name, operator, version_id):
def normalize_name(name):
"""https://www.python.org/dev/peps/pep-0503/#normalized-names"";
-import re
Indeed
--
You are receiving this because you are subscribed to
@s-t-e-v-e-n-k commented on this pull request.
> +try:
+from importlib.metadata import PathDistribution
+except ImportError:
+from importlib_metadata import PathDistribution
+
+try:
+from pathlib import Path
+except ImportError:
+from pathlib2 import Path
+
+
+class
@s-t-e-v-e-n-k commented on this pull request.
> @@ -142,9 +210,23 @@ def convert(name, operator, version_id):
def normalize_name(name):
It can't, and I wish it could be --
https://src.fedoraproject.org/rpms/python-rpm-generators/blob/master/f/pythonbundles.py#_41
--
You are receiving
@s-t-e-v-e-n-k commented on this pull request.
> +@classmethod
+def normalize_name(klass, name):
+"""https://www.python.org/dev/peps/pep-0503/#normalized-names"";
+return re.sub(r'[-_.]+', '-', name).lower()
+
+@classmethod
+def legacy_normalize_name(klass,
@s-t-e-v-e-n-k pushed 1 commit.
29f742a6b45b0d33463b963347cd083a1ebb2a71 pythondistdeps: Switch to
importlib.metadata
--
You are receiving this because you are subscribed to this thread.
View it on GitHub:
@s-t-e-v-e-n-k commented on this pull request.
> from warnings import warn
+try:
+from importlib.metadata import PathDistribution
+except ImportError:
+from importlib_metadata import PathDistribution
+
+try:
+from pathlib import Path
+except ImportError:
+from pathlib2 import
@s-t-e-v-e-n-k commented on this pull request.
> from warnings import warn
+try:
+from importlib.metadata import PathDistribution
+except ImportError:
+from importlib_metadata import PathDistribution
+
+try:
+from pathlib import Path
+except ImportError:
+from pathlib2 import
@s-t-e-v-e-n-k pushed 1 commit.
20ad7b9b4845386ddb54ce2a88465e00d992fd0c pythondistdeps: Switch to
importlib.metadata
--
You are receiving this because you are subscribed to this thread.
View it on GitHub:
@s-t-e-v-e-n-k commented on this pull request.
> -dep_normalized_name = dep.key
+dep_normalized_name = dep.name.lower().replace('_',
'-')
if args.legacy:
-name =
@torsava Hi, do you have a chance over the next few days to check this over
again?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
Latest push now has every test successfully run the script, however that one
test still fails because there's a difference in behaviour between the script
in this repo and in python-rpm-generators.
```
-if '>' == operator:
-# distutils does not behave this way, but this is
-
Once I remove the comments, it doesn't parse because the path doesn't contain
pythonX.Y, so it can't determine the python version, so we need to do something
there anyway.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
Okay, this new push solves all but one of the test failures, which has the
script failing to parse the requires.txt for pyreq2rpm.tests since it contains
comments.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
Any updates on the test suite investigation? Is there anything I can do to help?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
As a further note about the packaging dependency -- pkg_resources has been
using it since I think at least version 32 (I'd have to go back and check), and
you've not noticed because setuptools vendors it.
--
You are receiving this because you are subscribed to this thread.
Reply to this email
Stop using the heavy-weight pkg_resources and switch to a subclass of
importlib.metadata. This does add a dependency on packaging as well for
requirement and version parsing. I have also removed the comments about
the attempted rewrite, since I have addressed many of the concerns.
You can view,
Yes, flake8 warns on needing two blank lines, not one.
https://www.flake8rules.com/rules/E302.html
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
Would you like me to revert that part of the change? They are fairly
self-contained, so easy enough to pull out in a separate change.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
@s-t-e-v-e-n-k pushed 1 commit.
0afbfbb67b8b5d8346271a7d8d2351ad4ed0f411 scripts/pythondistdeps: Switch to
argparse
--
You are receiving this because you are subscribed to this thread.
View it on GitHub:
@s-t-e-v-e-n-k commented on this pull request.
> +parser.add_argument('-P', '--provides', action='store_true', help='Print
> Provides')
+parser.add_argument('-R', '--requires', action='store_true', help='Print
Requires')
+parser.add_argument('-r', '--recommends', action='store_true',
Stop using getopt, and switch to a modern solution for parsing
arguments. Drive-by fixing some flake8 warnings, mainly whitespace.
You can view, comment on, or merge this pull request online at:
https://github.com/rpm-software-management/rpm/pull/1181
-- Commit Summary --
*
21 matches
Mail list logo