Accepting request 987480 from Java:packages
6.1.0 OBS-URL: https://build.opensuse.org/request/show/987480 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/javapackages-tools?expand=0&rev=33
This commit is contained in:
commit
b230ed914d
@ -1,81 +0,0 @@
|
||||
From d2db56cd30a48bd2ece7a5112e67c80417406a36 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Fri, 29 Apr 2022 12:08:21 +0200
|
||||
Subject: [PATCH 1/3] Let maven_depmap.py generate metadata with dependencies
|
||||
under certain circumstances
|
||||
|
||||
---
|
||||
java-utils/maven_depmap.py | 43 +++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 42 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/java-utils/maven_depmap.py b/java-utils/maven_depmap.py
|
||||
index 92e0ff4c..f684a728 100644
|
||||
--- a/java-utils/maven_depmap.py
|
||||
+++ b/java-utils/maven_depmap.py
|
||||
@@ -49,6 +49,7 @@ from copy import deepcopy
|
||||
from javapackages.maven.pom import POM
|
||||
from javapackages.metadata.artifact import MetadataArtifact
|
||||
from javapackages.metadata.alias import MetadataAlias
|
||||
+from javapackages.metadata.dependency import MetadataDependency
|
||||
from javapackages.metadata.metadata import Metadata
|
||||
|
||||
from javapackages.common.exception import JavaPackagesToolsException
|
||||
@@ -132,6 +133,38 @@ def _make_files_versioned(versions, pom_path, jar_path, pom_base, jar_base):
|
||||
# return paths to versioned, but regular files (not symlinks)
|
||||
return ret_pom_path, ret_jar_path
|
||||
|
||||
+def _resolve_deps(pom):
|
||||
+ deps = []
|
||||
+ depm = []
|
||||
+ props = {}
|
||||
+
|
||||
+ deps.extend([x for x in pom.dependencies])
|
||||
+ depm.extend([x for x in pom.dependencyManagement])
|
||||
+ props = pom.properties
|
||||
+ if pom.groupId:
|
||||
+ props["project.groupId"] = pom.groupId
|
||||
+ if pom.artifactId:
|
||||
+ props["project.artifactId"] = pom.artifactId
|
||||
+ if pom.version:
|
||||
+ props["project.version"] = pom.version
|
||||
+
|
||||
+ for d in deps:
|
||||
+ d.interpolate(props)
|
||||
+
|
||||
+ for dm in depm:
|
||||
+ dm.interpolate(props)
|
||||
+
|
||||
+ # apply dependencyManagement on deps
|
||||
+ for d in deps:
|
||||
+ for dm in depm:
|
||||
+ if d.compare_to(dm):
|
||||
+ d.merge_with(dm)
|
||||
+ break
|
||||
+
|
||||
+ # only deps with scope "compile" or "runtime" are interesting
|
||||
+ deps = [x for x in deps if x.scope in ["", "compile", "runtime"]]
|
||||
+
|
||||
+ return deps
|
||||
|
||||
# Add a file to a ZIP archive (or JAR, WAR, ...) unless the file
|
||||
# already exists in the archive. Provided by Tomas Radej.
|
||||
@@ -279,7 +312,15 @@ def _main():
|
||||
if namespace:
|
||||
artifact.namespace = namespace
|
||||
|
||||
- artifact.properties["xmvn.resolver.disableEffectivePom"] = "true"
|
||||
+ pom = POM(pom_path)
|
||||
+ if pom.parent or pom.packaging == "pom":
|
||||
+ artifact.properties["xmvn.resolver.disableEffectivePom"] = "true"
|
||||
+ else:
|
||||
+ deps = []
|
||||
+ for d in _resolve_deps(pom):
|
||||
+ deps.append(MetadataDependency.from_mvn_dependency(d))
|
||||
+ if deps:
|
||||
+ artifact.dependencies = set(deps)
|
||||
|
||||
|
||||
buildroot = os.environ.get('RPM_BUILD_ROOT')
|
||||
--
|
||||
2.36.0
|
||||
|
@ -1,29 +0,0 @@
|
||||
From c0a4b557eb9a3b20c36fabe67ffac953ba78d2a5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Fri, 29 Apr 2022 13:27:10 +0200
|
||||
Subject: [PATCH 2/3] Do not try to construct POM from maven coordinate string
|
||||
|
||||
---
|
||||
java-utils/maven_depmap.py | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/java-utils/maven_depmap.py b/java-utils/maven_depmap.py
|
||||
index f684a728..367632e6 100644
|
||||
--- a/java-utils/maven_depmap.py
|
||||
+++ b/java-utils/maven_depmap.py
|
||||
@@ -312,8 +312,10 @@ def _main():
|
||||
if namespace:
|
||||
artifact.namespace = namespace
|
||||
|
||||
- pom = POM(pom_path)
|
||||
- if pom.parent or pom.packaging == "pom":
|
||||
+ pom = None
|
||||
+ if have_pom:
|
||||
+ pom = POM(pom_path)
|
||||
+ if not pom or pom.parent or pom.packaging == "pom":
|
||||
artifact.properties["xmvn.resolver.disableEffectivePom"] = "true"
|
||||
else:
|
||||
deps = []
|
||||
--
|
||||
2.36.0
|
||||
|
@ -1,136 +0,0 @@
|
||||
From 527108b4d064417ab41da7abd70a47f58fcf91d6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Fri, 29 Apr 2022 13:27:33 +0200
|
||||
Subject: [PATCH 3/3] Fix tests after the recent maven_depmap.py changes
|
||||
|
||||
---
|
||||
test/data/maven_depmap/test_alias_extension-want.xml | 6 ------
|
||||
test/data/maven_depmap/test_basic-want.xml | 6 ------
|
||||
test/data/maven_depmap/test_buildroot-want.xml | 6 ------
|
||||
test/data/maven_depmap/test_versioned_with_pom-want.xml | 6 ------
|
||||
test/data/maven_depmap/test_war-want.xml | 6 ------
|
||||
5 files changed, 30 deletions(-)
|
||||
|
||||
diff --git a/test/data/maven_depmap/test_alias_extension-want.xml b/test/data/maven_depmap/test_alias_extension-want.xml
|
||||
index 6b0d1aee..d502fdf8 100644
|
||||
--- a/test/data/maven_depmap/test_alias_extension-want.xml
|
||||
+++ b/test/data/maven_depmap/test_alias_extension-want.xml
|
||||
@@ -13,9 +13,6 @@
|
||||
</ns1:alias>
|
||||
</ns1:aliases>
|
||||
<ns1:path>%s/usr/share/java/commons-io.jar</ns1:path>
|
||||
- <ns1:properties>
|
||||
- <xmvn.resolver.disableEffectivePom>true</xmvn.resolver.disableEffectivePom>
|
||||
- </ns1:properties>
|
||||
</ns1:artifact>
|
||||
<ns1:artifact>
|
||||
<ns1:groupId>alias</ns1:groupId>
|
||||
@@ -30,9 +27,6 @@
|
||||
</ns1:alias>
|
||||
</ns1:aliases>
|
||||
<ns1:path>%s/JPP-alias.pom</ns1:path>
|
||||
- <ns1:properties>
|
||||
- <xmvn.resolver.disableEffectivePom>true</xmvn.resolver.disableEffectivePom>
|
||||
- </ns1:properties>
|
||||
</ns1:artifact>
|
||||
</ns1:artifacts>
|
||||
</ns1:metadata>
|
||||
diff --git a/test/data/maven_depmap/test_basic-want.xml b/test/data/maven_depmap/test_basic-want.xml
|
||||
index 540f076a..200044bf 100644
|
||||
--- a/test/data/maven_depmap/test_basic-want.xml
|
||||
+++ b/test/data/maven_depmap/test_basic-want.xml
|
||||
@@ -6,9 +6,6 @@
|
||||
<ns1:artifactId>bndlib</ns1:artifactId>
|
||||
<ns1:version>1.50.0</ns1:version>
|
||||
<ns1:path>%s/usr/share/java/bndlib.jar</ns1:path>
|
||||
- <ns1:properties>
|
||||
- <xmvn.resolver.disableEffectivePom>true</xmvn.resolver.disableEffectivePom>
|
||||
- </ns1:properties>
|
||||
</ns1:artifact>
|
||||
<ns1:artifact>
|
||||
<ns1:groupId>biz.aQute</ns1:groupId>
|
||||
@@ -16,9 +13,6 @@
|
||||
<ns1:extension>pom</ns1:extension>
|
||||
<ns1:version>1.50.0</ns1:version>
|
||||
<ns1:path>%s/JPP-bndlib.pom</ns1:path>
|
||||
- <ns1:properties>
|
||||
- <xmvn.resolver.disableEffectivePom>true</xmvn.resolver.disableEffectivePom>
|
||||
- </ns1:properties>
|
||||
</ns1:artifact>
|
||||
</ns1:artifacts>
|
||||
</ns1:metadata>
|
||||
diff --git a/test/data/maven_depmap/test_buildroot-want.xml b/test/data/maven_depmap/test_buildroot-want.xml
|
||||
index 604046a5..9fa588d4 100644
|
||||
--- a/test/data/maven_depmap/test_buildroot-want.xml
|
||||
+++ b/test/data/maven_depmap/test_buildroot-want.xml
|
||||
@@ -7,9 +7,6 @@
|
||||
<ns1:version>17</ns1:version>
|
||||
<ns1:extension>war</ns1:extension>
|
||||
<ns1:path>%s/usr/share/java/commons-war.war</ns1:path>
|
||||
- <ns1:properties>
|
||||
- <xmvn.resolver.disableEffectivePom>true</xmvn.resolver.disableEffectivePom>
|
||||
- </ns1:properties>
|
||||
</ns1:artifact>
|
||||
<ns1:artifact>
|
||||
<ns1:groupId>commons</ns1:groupId>
|
||||
@@ -17,9 +14,6 @@
|
||||
<ns1:version>17</ns1:version>
|
||||
<ns1:extension>pom</ns1:extension>
|
||||
<ns1:path>/usr/share/maven-poms/JPP-commons-war.pom</ns1:path>
|
||||
- <ns1:properties>
|
||||
- <xmvn.resolver.disableEffectivePom>true</xmvn.resolver.disableEffectivePom>
|
||||
- </ns1:properties>
|
||||
</ns1:artifact>
|
||||
</ns1:artifacts>
|
||||
</ns1:metadata>
|
||||
diff --git a/test/data/maven_depmap/test_versioned_with_pom-want.xml b/test/data/maven_depmap/test_versioned_with_pom-want.xml
|
||||
index c2b344e1..8d259ab9 100644
|
||||
--- a/test/data/maven_depmap/test_versioned_with_pom-want.xml
|
||||
+++ b/test/data/maven_depmap/test_versioned_with_pom-want.xml
|
||||
@@ -9,9 +9,6 @@
|
||||
<ns1:version>2013.10</ns1:version>
|
||||
</ns1:compatVersions>
|
||||
<ns1:path>%s/usr/share/java/testversioned-2013.10.jar</ns1:path>
|
||||
- <ns1:properties>
|
||||
- <xmvn.resolver.disableEffectivePom>true</xmvn.resolver.disableEffectivePom>
|
||||
- </ns1:properties>
|
||||
</ns1:artifact>
|
||||
<ns1:artifact>
|
||||
<ns1:groupId>alias</ns1:groupId>
|
||||
@@ -22,9 +19,6 @@
|
||||
<ns1:version>2013.10</ns1:version>
|
||||
</ns1:compatVersions>
|
||||
<ns1:path>%s/JPP-testversioned-2013.10.pom</ns1:path>
|
||||
- <ns1:properties>
|
||||
- <xmvn.resolver.disableEffectivePom>true</xmvn.resolver.disableEffectivePom>
|
||||
- </ns1:properties>
|
||||
</ns1:artifact>
|
||||
</ns1:artifacts>
|
||||
</ns1:metadata>
|
||||
diff --git a/test/data/maven_depmap/test_war-want.xml b/test/data/maven_depmap/test_war-want.xml
|
||||
index cac27a84..e8e2e56b 100644
|
||||
--- a/test/data/maven_depmap/test_war-want.xml
|
||||
+++ b/test/data/maven_depmap/test_war-want.xml
|
||||
@@ -7,9 +7,6 @@
|
||||
<ns1:version>17</ns1:version>
|
||||
<ns1:extension>war</ns1:extension>
|
||||
<ns1:path>%s/usr/share/java/commons-war.war</ns1:path>
|
||||
- <ns1:properties>
|
||||
- <xmvn.resolver.disableEffectivePom>true</xmvn.resolver.disableEffectivePom>
|
||||
- </ns1:properties>
|
||||
</ns1:artifact>
|
||||
<ns1:artifact>
|
||||
<ns1:groupId>commons</ns1:groupId>
|
||||
@@ -17,9 +14,6 @@
|
||||
<ns1:extension>pom</ns1:extension>
|
||||
<ns1:version>17</ns1:version>
|
||||
<ns1:path>%s/JPP-commons-war.pom</ns1:path>
|
||||
- <ns1:properties>
|
||||
- <xmvn.resolver.disableEffectivePom>true</xmvn.resolver.disableEffectivePom>
|
||||
- </ns1:properties>
|
||||
</ns1:artifact>
|
||||
</ns1:artifacts>
|
||||
</ns1:metadata>
|
||||
--
|
||||
2.36.0
|
||||
|
@ -1,473 +0,0 @@
|
||||
From 06018a8e30d8b781b7b2937fa7c579a5c0758d57 Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Thu, 23 Jul 2020 10:22:52 +0200
|
||||
Subject: [PATCH] Remove dependency on Six compatibility library
|
||||
|
||||
Python 2 support was dropped, so use of Six is no longer needed.
|
||||
---
|
||||
Vagrantfile | 1 -
|
||||
java-utils/builddep.py | 2 --
|
||||
java-utils/mvn_alias.py | 3 ---
|
||||
java-utils/mvn_artifact.py | 3 ---
|
||||
java-utils/mvn_build.py | 4 +---
|
||||
java-utils/mvn_compat_version.py | 2 --
|
||||
java-utils/mvn_config.py | 2 --
|
||||
java-utils/mvn_file.py | 2 --
|
||||
java-utils/mvn_package.py | 2 --
|
||||
java-utils/pom_editor.py | 7 +++----
|
||||
javapackages-tools.spec | 2 --
|
||||
python/javapackages/common/binding.py | 14 ++++++--------
|
||||
python/javapackages/common/util.py | 8 --------
|
||||
python/javapackages/maven/artifact.py | 5 ++---
|
||||
python/javapackages/metadata/artifact.py | 3 +--
|
||||
python/javapackages/metadata/dependency.py | 4 +---
|
||||
python/javapackages/xmvn/xmvn_config.py | 5 ++---
|
||||
requirements.txt | 1 -
|
||||
test/maven_depmap_test.py | 5 ++---
|
||||
19 files changed, 18 insertions(+), 57 deletions(-)
|
||||
|
||||
diff --git a/Vagrantfile b/Vagrantfile
|
||||
index 64235dc9..095d9065 100644
|
||||
--- a/Vagrantfile
|
||||
+++ b/Vagrantfile
|
||||
@@ -12,7 +12,6 @@ dnf install -y \
|
||||
xmlto \
|
||||
python{,3} \
|
||||
python{,3}-lxml \
|
||||
- python{,3}-six \
|
||||
python{,3}-nose \
|
||||
python{,3}-coverage
|
||||
SCRIPT
|
||||
diff --git a/java-utils/builddep.py b/java-utils/builddep.py
|
||||
index fda36d2d..695e22dc 100644
|
||||
--- a/java-utils/builddep.py
|
||||
+++ b/java-utils/builddep.py
|
||||
@@ -35,7 +35,6 @@
|
||||
|
||||
from javapackages.maven.artifact import (Artifact, ArtifactFormatException,
|
||||
ArtifactValidationException)
|
||||
-from javapackages.common.util import args_to_unicode
|
||||
from javapackages.common.exception import JavaPackagesToolsException
|
||||
|
||||
from lxml import etree
|
||||
@@ -53,7 +52,6 @@ def format_epilog(self, formatter):
|
||||
if __name__ == "__main__":
|
||||
parser = SaneParser(usage=usage,
|
||||
epilog=epilog)
|
||||
- sys.argv = args_to_unicode(sys.argv)
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
if len(args) != 1:
|
||||
diff --git a/java-utils/mvn_alias.py b/java-utils/mvn_alias.py
|
||||
index 4979a17a..86d527de 100644
|
||||
--- a/java-utils/mvn_alias.py
|
||||
+++ b/java-utils/mvn_alias.py
|
||||
@@ -36,7 +36,6 @@
|
||||
from javapackages.maven.artifact import (Artifact, ArtifactFormatException,
|
||||
ArtifactValidationException)
|
||||
from javapackages.xmvn.xmvn_config import XMvnConfig
|
||||
-from javapackages.common.util import args_to_unicode
|
||||
from javapackages.common.exception import JavaPackagesToolsException
|
||||
|
||||
|
||||
@@ -65,8 +64,6 @@ def format_epilog(self, formatter):
|
||||
parser = SaneParser(usage=usage,
|
||||
epilog=epilog)
|
||||
|
||||
- sys.argv = args_to_unicode(sys.argv)
|
||||
-
|
||||
(options, args) = parser.parse_args()
|
||||
if len(args) < 2:
|
||||
parser.error("At least 2 arguments are required")
|
||||
diff --git a/java-utils/mvn_artifact.py b/java-utils/mvn_artifact.py
|
||||
index d135adf2..11cd6fb2 100644
|
||||
--- a/java-utils/mvn_artifact.py
|
||||
+++ b/java-utils/mvn_artifact.py
|
||||
@@ -42,7 +42,6 @@
|
||||
|
||||
from javapackages.xmvn.xmvn_resolve import (XMvnResolve, ResolutionRequest,
|
||||
XMvnResolveException)
|
||||
-from javapackages.common.util import args_to_unicode
|
||||
from javapackages.common.exception import JavaPackagesToolsException
|
||||
|
||||
import sys
|
||||
@@ -240,8 +239,6 @@ def _main():
|
||||
parser.add_option("-D", action="append", type="str",
|
||||
help="add artifact property", metavar="property=value")
|
||||
|
||||
- sys.argv = args_to_unicode(sys.argv)
|
||||
-
|
||||
(options, args) = parser.parse_args()
|
||||
if len(args) < 1:
|
||||
parser.error("At least 1 argument is required")
|
||||
diff --git a/java-utils/mvn_build.py b/java-utils/mvn_build.py
|
||||
index 720787de..666d791b 100644
|
||||
--- a/java-utils/mvn_build.py
|
||||
+++ b/java-utils/mvn_build.py
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
from javapackages.maven.artifact import Artifact
|
||||
from javapackages.xmvn.xmvn_config import XMvnConfig
|
||||
-from javapackages.common.util import args_to_unicode, command_exists
|
||||
+from javapackages.common.util import command_exists
|
||||
from javapackages.common.mock import socket_path as mock_socket
|
||||
|
||||
|
||||
@@ -102,8 +102,6 @@ def goal_callback(option, opt_str, value, parser):
|
||||
action="store_true",
|
||||
help="Use experimental XMvn javadoc MOJO to generate javadocs.")
|
||||
|
||||
- sys.argv = args_to_unicode(sys.argv)
|
||||
-
|
||||
(options, args) = parser.parse_args()
|
||||
xc = XMvnConfig()
|
||||
|
||||
diff --git a/java-utils/mvn_compat_version.py b/java-utils/mvn_compat_version.py
|
||||
index e4afdbd7..9646bda5 100644
|
||||
--- a/java-utils/mvn_compat_version.py
|
||||
+++ b/java-utils/mvn_compat_version.py
|
||||
@@ -36,7 +36,6 @@
|
||||
from javapackages.maven.artifact import (Artifact, ArtifactFormatException,
|
||||
ArtifactValidationException)
|
||||
from javapackages.xmvn.xmvn_config import XMvnConfig
|
||||
-from javapackages.common.util import args_to_unicode
|
||||
from javapackages.common.exception import JavaPackagesToolsException
|
||||
|
||||
|
||||
@@ -64,7 +63,6 @@ def format_epilog(self, formatter):
|
||||
if __name__ == "__main__":
|
||||
parser = SaneParser(usage=usage,
|
||||
epilog=epilog)
|
||||
- sys.argv = args_to_unicode(sys.argv)
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
if len(args) < 2:
|
||||
diff --git a/java-utils/mvn_config.py b/java-utils/mvn_config.py
|
||||
index 7597761e..ee6a788d 100644
|
||||
--- a/java-utils/mvn_config.py
|
||||
+++ b/java-utils/mvn_config.py
|
||||
@@ -34,7 +34,6 @@
|
||||
import optparse
|
||||
|
||||
from javapackages.xmvn.xmvn_config import XMvnConfig
|
||||
-from javapackages.common.util import args_to_unicode
|
||||
from javapackages.common.exception import JavaPackagesToolsException
|
||||
|
||||
|
||||
@@ -60,7 +59,6 @@ def format_epilog(self, formatter):
|
||||
if __name__ == "__main__":
|
||||
parser = SaneParser(usage=usage,
|
||||
epilog=epilog)
|
||||
- sys.argv = args_to_unicode(sys.argv)
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
if len(args) != 2:
|
||||
diff --git a/java-utils/mvn_file.py b/java-utils/mvn_file.py
|
||||
index 39d1348f..87eab376 100644
|
||||
--- a/java-utils/mvn_file.py
|
||||
+++ b/java-utils/mvn_file.py
|
||||
@@ -36,7 +36,6 @@
|
||||
from javapackages.maven.artifact import (Artifact, ArtifactFormatException,
|
||||
ArtifactValidationException)
|
||||
from javapackages.xmvn.xmvn_config import XMvnConfig, XMvnConfigException
|
||||
-from javapackages.common.util import args_to_unicode
|
||||
from javapackages.common.exception import JavaPackagesToolsException
|
||||
|
||||
|
||||
@@ -64,7 +63,6 @@ def format_epilog(self, formatter):
|
||||
if __name__ == "__main__":
|
||||
parser = SaneParser(usage=usage,
|
||||
epilog=epilog)
|
||||
- sys.argv = args_to_unicode(sys.argv)
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
if len(args) < 2:
|
||||
diff --git a/java-utils/mvn_package.py b/java-utils/mvn_package.py
|
||||
index b74da128..a016e057 100644
|
||||
--- a/java-utils/mvn_package.py
|
||||
+++ b/java-utils/mvn_package.py
|
||||
@@ -36,7 +36,6 @@
|
||||
from javapackages.maven.artifact import (Artifact, ArtifactFormatException,
|
||||
ArtifactValidationException)
|
||||
from javapackages.xmvn.xmvn_config import XMvnConfig
|
||||
-from javapackages.common.util import args_to_unicode
|
||||
from javapackages.common.exception import JavaPackagesToolsException
|
||||
|
||||
|
||||
@@ -64,7 +63,6 @@ def format_epilog(self, formatter):
|
||||
if __name__ == "__main__":
|
||||
parser = SaneParser(usage=usage,
|
||||
epilog=epilog)
|
||||
- sys.argv = args_to_unicode(sys.argv)
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
diff --git a/java-utils/pom_editor.py b/java-utils/pom_editor.py
|
||||
index 82a555b8..adae6e90 100644
|
||||
--- a/java-utils/pom_editor.py
|
||||
+++ b/java-utils/pom_editor.py
|
||||
@@ -5,7 +5,6 @@
|
||||
import shutil
|
||||
import sys
|
||||
import optparse
|
||||
-import six
|
||||
import io
|
||||
|
||||
from lxml import etree
|
||||
@@ -53,7 +52,7 @@ def from_mvn_str(cls, string):
|
||||
return cls(**values)
|
||||
|
||||
def update(self, artifact):
|
||||
- for key, value in six.iteritems(artifact.values):
|
||||
+ for key, value in artifact.values.items():
|
||||
if key not in parts:
|
||||
raise KeyError(key + ' not defined')
|
||||
if value:
|
||||
@@ -120,7 +119,7 @@ class AttributeArtifact(Artifact):
|
||||
@classmethod
|
||||
def from_xml(cls, element):
|
||||
values = dict([(key, val) for key, val
|
||||
- in six.iteritems(element.attrib) if key in parts])
|
||||
+ in element.attrib.items() if key in parts])
|
||||
return cls(**values)
|
||||
|
||||
def get_xml(self, node='artifact', extra=''):
|
||||
@@ -355,7 +354,7 @@ def make_path(self, node, elements):
|
||||
children = node.xpath(elem, namespaces=self.NSMAP)
|
||||
if not children:
|
||||
name = elements[0]
|
||||
- for ns, url in six.iteritems(self.NSMAP):
|
||||
+ for ns, url in self.NSMAP.items():
|
||||
ns_token = ns + ':'
|
||||
url_token = '{' + url + '}'
|
||||
name = name.replace(ns_token, url_token)
|
||||
diff --git a/javapackages-tools.spec b/javapackages-tools.spec
|
||||
index 65f34274..b221f5ca 100644
|
||||
--- a/javapackages-tools.spec
|
||||
+++ b/javapackages-tools.spec
|
||||
@@ -45,7 +45,6 @@ BuildRequires: %{python_prefix}-devel
|
||||
BuildRequires: %{python_prefix}-lxml
|
||||
BuildRequires: %{python_prefix}-setuptools
|
||||
BuildRequires: %{python_prefix}-nose
|
||||
-BuildRequires: %{python_prefix}-six
|
||||
|
||||
Requires: %{?scl_prefix}javapackages-filesystem = %{version}-%{release}
|
||||
Requires: coreutils
|
||||
@@ -122,7 +121,6 @@ artifact resolution using XMvn resolver.
|
||||
%package -n %{?scl_prefix}%{python_prefix}-javapackages
|
||||
Summary: Module for handling various files for Java packaging
|
||||
Requires: %{python_prefix}-lxml
|
||||
-Requires: %{python_prefix}-six
|
||||
Obsoletes: %{?scl_prefix}python-javapackages < %{version}-%{release}
|
||||
|
||||
%description -n %{?scl_prefix}%{python_prefix}-javapackages
|
||||
diff --git a/python/javapackages/common/binding.py b/python/javapackages/common/binding.py
|
||||
index 550d9f97..f646e229 100644
|
||||
--- a/python/javapackages/common/binding.py
|
||||
+++ b/python/javapackages/common/binding.py
|
||||
@@ -30,8 +30,6 @@
|
||||
#
|
||||
# Authors: Michael Simacek <msimacek@redhat.com>
|
||||
|
||||
-import six
|
||||
-
|
||||
from lxml import etree
|
||||
from copy import deepcopy
|
||||
|
||||
@@ -46,9 +44,9 @@ def _get_item_type(spec):
|
||||
spec = tuple(spec)
|
||||
ret = spec[0]
|
||||
if len(spec) == 1:
|
||||
- if isinstance(spec[0], six.string_types):
|
||||
+ if isinstance(spec[0], str):
|
||||
ret = str
|
||||
- elif isinstance(spec[0], six.string_types):
|
||||
+ elif isinstance(spec[0], str):
|
||||
ret = spec[1]
|
||||
assert isinstance(ret, type), ret
|
||||
return ret
|
||||
@@ -62,12 +60,12 @@ def _get_item_name(spec):
|
||||
ret = spec[0].element_name
|
||||
elif len(spec) == 2 and isinstance(spec[0], type):
|
||||
ret = spec[1]
|
||||
- assert isinstance(ret, six.string_types), ret
|
||||
+ assert isinstance(ret, str), ret
|
||||
return ret
|
||||
|
||||
|
||||
def _is_element(node):
|
||||
- return isinstance(node.tag, six.string_types)
|
||||
+ return isinstance(node.tag, str)
|
||||
|
||||
def _localname(element):
|
||||
return etree.QName(element.tag).localname
|
||||
@@ -86,7 +84,7 @@ def from_element(for_type, element):
|
||||
if for_type is dict:
|
||||
new = {}
|
||||
for child in element:
|
||||
- if isinstance(child.tag, six.string_types):
|
||||
+ if isinstance(child.tag, str):
|
||||
name = _localname(child)
|
||||
value = from_element(str, child)
|
||||
new[name] = value
|
||||
@@ -114,7 +112,7 @@ def _make_element(name, ns=None):
|
||||
return etree.Element(name)
|
||||
|
||||
def to_element(obj, name=None, type_spec=None, ns=None):
|
||||
- if isinstance(obj, six.string_types):
|
||||
+ if isinstance(obj, str):
|
||||
element = _make_element(name, ns=ns)
|
||||
element.text = obj
|
||||
return element
|
||||
diff --git a/python/javapackages/common/util.py b/python/javapackages/common/util.py
|
||||
index d9b349a6..4c966687 100644
|
||||
--- a/python/javapackages/common/util.py
|
||||
+++ b/python/javapackages/common/util.py
|
||||
@@ -34,7 +34,6 @@
|
||||
import os
|
||||
import signal
|
||||
import sys
|
||||
-import six
|
||||
import subprocess
|
||||
import logging
|
||||
import re
|
||||
@@ -60,13 +59,6 @@ def kill_parent_process(rpmconf):
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
-def args_to_unicode(args):
|
||||
- if six.PY2:
|
||||
- for index, arg in enumerate(args):
|
||||
- args[index] = arg.decode(sys.getfilesystemencoding())
|
||||
- return args
|
||||
-
|
||||
-
|
||||
def execute_command(command, input=None):
|
||||
proc = subprocess.Popen([command], shell=True,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
||||
diff --git a/python/javapackages/maven/artifact.py b/python/javapackages/maven/artifact.py
|
||||
index e79cd014..6ba3ee6f 100644
|
||||
--- a/python/javapackages/maven/artifact.py
|
||||
+++ b/python/javapackages/maven/artifact.py
|
||||
@@ -33,7 +33,6 @@
|
||||
# Michal Srb <msrb@redhat.com>
|
||||
|
||||
import re
|
||||
-import six
|
||||
|
||||
import javapackages.maven.pomreader as POMReader
|
||||
import javapackages.common.strutils as Printer
|
||||
@@ -190,7 +189,7 @@ def interpolate(self, properties):
|
||||
for member in self.__dict__:
|
||||
if (not member.startswith('_') and
|
||||
getattr(self, member) and
|
||||
- isinstance(getattr(self, member), six.string_types)):
|
||||
+ isinstance(getattr(self, member), str)):
|
||||
curr_value = getattr(self, member)
|
||||
prog = re.compile("\$\{([^}]+)\}")
|
||||
props = prog.findall(curr_value)
|
||||
@@ -205,7 +204,7 @@ def interpolate(self, properties):
|
||||
return leftovers
|
||||
|
||||
def __unicode__(self):
|
||||
- return six.text_type(self.get_mvn_str())
|
||||
+ return self.get_mvn_str()
|
||||
|
||||
def __str__(self):
|
||||
return self.__unicode__()
|
||||
diff --git a/python/javapackages/metadata/artifact.py b/python/javapackages/metadata/artifact.py
|
||||
index 3593d76d..72e57e62 100644
|
||||
--- a/python/javapackages/metadata/artifact.py
|
||||
+++ b/python/javapackages/metadata/artifact.py
|
||||
@@ -42,7 +42,6 @@
|
||||
|
||||
from javapackages.common.binding import ObjectBinding
|
||||
|
||||
-import six
|
||||
import os
|
||||
|
||||
|
||||
@@ -133,7 +132,7 @@ def get_rpm_str(self, namespace=None, pkg_ver=None):
|
||||
return "\n".join(result)
|
||||
|
||||
def __unicode__(self):
|
||||
- return six.text_type(self.get_mvn_str())
|
||||
+ return self.get_mvn_str()
|
||||
|
||||
def __str__(self):
|
||||
return self.__unicode__()
|
||||
diff --git a/python/javapackages/metadata/dependency.py b/python/javapackages/metadata/dependency.py
|
||||
index 8f843af4..1e553ac3 100644
|
||||
--- a/python/javapackages/metadata/dependency.py
|
||||
+++ b/python/javapackages/metadata/dependency.py
|
||||
@@ -37,8 +37,6 @@
|
||||
|
||||
from javapackages.common.binding import ObjectBinding
|
||||
|
||||
-import six
|
||||
-
|
||||
|
||||
class MetadataDependency(ObjectBinding):
|
||||
element_name = 'dependency'
|
||||
@@ -100,7 +98,7 @@ def is_skipped(self, skipped_artifacts):
|
||||
return False
|
||||
|
||||
def __unicode__(self):
|
||||
- return six.text_type(self.get_mvn_str())
|
||||
+ return self.get_mvn_str()
|
||||
|
||||
def __str__(self):
|
||||
return self.__unicode__()
|
||||
diff --git a/python/javapackages/xmvn/xmvn_config.py b/python/javapackages/xmvn/xmvn_config.py
|
||||
index 66d11344..f2aefbe6 100644
|
||||
--- a/python/javapackages/xmvn/xmvn_config.py
|
||||
+++ b/python/javapackages/xmvn/xmvn_config.py
|
||||
@@ -34,8 +34,7 @@
|
||||
import errno
|
||||
import os
|
||||
import re
|
||||
-import six
|
||||
-from six import BytesIO
|
||||
+from io import BytesIO
|
||||
|
||||
from javapackages.maven.artifact import ArtifactValidationException
|
||||
from javapackages.common.exception import JavaPackagesToolsException
|
||||
@@ -131,7 +130,7 @@ def __add_config(self, level1, level2, level3=None, content=None):
|
||||
if level3:
|
||||
cont_level = SubElement(level2, level3)
|
||||
|
||||
- if isinstance(content, six.string_types):
|
||||
+ if isinstance(content, str):
|
||||
cont_level.text = content
|
||||
elif isinstance(content, list):
|
||||
for elem in content:
|
||||
diff --git a/requirements.txt b/requirements.txt
|
||||
index db272a8d..ab90481d 100644
|
||||
--- a/requirements.txt
|
||||
+++ b/requirements.txt
|
||||
@@ -1,2 +1 @@
|
||||
lxml
|
||||
-six
|
||||
diff --git a/test/maven_depmap_test.py b/test/maven_depmap_test.py
|
||||
index 186ceec1..c21f66d4 100644
|
||||
--- a/test/maven_depmap_test.py
|
||||
+++ b/test/maven_depmap_test.py
|
||||
@@ -1,6 +1,5 @@
|
||||
import inspect
|
||||
from zipfile import ZipFile
|
||||
-import six
|
||||
import os
|
||||
import unittest
|
||||
import shutil
|
||||
@@ -68,9 +67,9 @@ def read_archive(self, archive, keep_comments=False):
|
||||
mf_file = archive.open(filename)
|
||||
try:
|
||||
if (keep_comments):
|
||||
- res[six.text_type(filename)] = mf_file.readlines()
|
||||
+ res[str(filename)] = mf_file.readlines()
|
||||
else:
|
||||
- res[six.text_type(filename)] = \
|
||||
+ res[str(filename)] = \
|
||||
[line for line in mf_file.readlines()
|
||||
if not line.startswith(b'#')]
|
||||
finally:
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3c2cbead4299ae4e4d0303f5f3d132754f06fd7e6d07526cea3cf992af2d15aa
|
||||
size 155512
|
3
6.1.0.tar.gz
Normal file
3
6.1.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6b31e5d858c7a1d62cc6e95450590a4e4526237403ecfad34d1a39a1f496d673
|
||||
size 155816
|
4441
javapackages-6.1.0-maven-depmap.patch
Normal file
4441
javapackages-6.1.0-maven-depmap.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,70 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 7 06:50:09 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Update to upstream version 6.1.0
|
||||
* Release version 6.1.0
|
||||
* Introduce common and extra subpackages
|
||||
* Update documentation
|
||||
* Add lua interpreter to check and GH actions
|
||||
* Remove license headers from wrapper scripts
|
||||
* Make scripts compatible with rpmlua
|
||||
* Add more tests, fix behaviour
|
||||
* Implement separate simple class name matching
|
||||
* Minor changes
|
||||
* Modularize Lua scripts
|
||||
* Add Lua scripts for removing annotations
|
||||
* Update build status badge in README.md
|
||||
* Migrate CI from TravisCI to GitHub Actions
|
||||
* Fix running tests without coverage
|
||||
* Update ivy-local-classpath
|
||||
* Release version 6.0.0
|
||||
* Fix extra XML handling of pom_change_dep
|
||||
* Add reproducer for #82
|
||||
* Respect %jpb_env RPM macro
|
||||
* Add bootstrap metadata to XMvn resolver config
|
||||
* Delete run_tests.py
|
||||
* Replace nose by pytest
|
||||
* [install] Make glob pattern work with Python 3.10
|
||||
* Adding ppc64le architecture support on travis-ci
|
||||
* Drop deprecated add_maven_depmap macro
|
||||
* Drop SCL support
|
||||
* Fix provides matching
|
||||
* Fix builddep snippet generation
|
||||
* [test] Add test for builddep snippet generation
|
||||
* Add location of java binary used by the java-1.8.0-openjdk
|
||||
(JRE) package so that setting JAVA_HOME will work correctly
|
||||
* Use XMvn Javadoc MOJO by default
|
||||
* Remove explicit import of Python 3 features
|
||||
* Remove dependency on Six compatibility library
|
||||
* Fix invalid <skippedPlugins> in XMvn configuration
|
||||
* [test] Don't try to kill PID 1 during tests
|
||||
* [travis] Drop Python 2 from test matrix
|
||||
* Add separate subpackage with RPM generators
|
||||
* mvn_build: replace inline shell scriptlet with native python
|
||||
code
|
||||
* [test] Don't use networking during tests
|
||||
* Add apache-rat-plugin to skippedPlugins
|
||||
* Skip execution of various Maven plugins
|
||||
* Remove Python 3.5 from .travis.yml
|
||||
* Make generated javadoc package noarch
|
||||
- Added patch:
|
||||
* javapackages-6.1.0-maven-depmap.patch
|
||||
+ Bulk patch correspoding to our pull request
|
||||
https://github.com/fedora-java/javapackages/pull/92 which
|
||||
brings back some of the removed tools that we depend on
|
||||
heavily
|
||||
- Modified patches:
|
||||
* python-optional.patch
|
||||
* suse-use-libdir.patch
|
||||
+ Rediff to changed context
|
||||
- Removed patches:
|
||||
* 0001-Let-maven_depmap.py-generate-metadata-with-dependenc.patch
|
||||
* 0002-Do-not-try-to-construct-POM-from-maven-coordinate-st.patch
|
||||
* 0003-Fix-tests-after-the-recent-maven_depmap.py-changes.patch
|
||||
+ Already part of the above-mentioned bulk patch
|
||||
* 0004-Remove-dependency-on-Six-compatibility-library.patch
|
||||
+ Upstream patch already integrated in the 6.x code-line
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 5 20:04:33 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
@ -30,7 +30,7 @@ Name: javapackages-tools-%{flavor}
|
||||
%else
|
||||
Name: javapackages-tools
|
||||
%endif
|
||||
Version: 5.3.1
|
||||
Version: 6.1.0
|
||||
Release: 0
|
||||
Summary: Macros and scripts for Java packaging support
|
||||
License: BSD-3-Clause
|
||||
@ -46,10 +46,7 @@ Patch1: python-optional.patch
|
||||
# Avoid generating unresolvable requires
|
||||
Patch2: suse-no-epoch.patch
|
||||
#PATCH-FIX-SUSE: Let maven_depmap.py generate metadata with dependencies under certain circumstances
|
||||
Patch3: 0001-Let-maven_depmap.py-generate-metadata-with-dependenc.patch
|
||||
Patch4: 0002-Do-not-try-to-construct-POM-from-maven-coordinate-st.patch
|
||||
Patch5: 0003-Fix-tests-after-the-recent-maven_depmap.py-changes.patch
|
||||
Patch6: 0004-Remove-dependency-on-Six-compatibility-library.patch
|
||||
Patch3: javapackages-%{version}-maven-depmap.patch
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: perl
|
||||
@ -68,8 +65,6 @@ Obsoletes: jpackage-utils < %{version}
|
||||
BuildRequires: %{python_module lxml}
|
||||
%if 0%{?suse_version} > 1320
|
||||
BuildRequires: %{python_module pytest}
|
||||
%else
|
||||
BuildRequires: %{python_module six}
|
||||
%endif
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: python-rpm-macros
|
||||
@ -124,9 +119,6 @@ allows artifact resolution using XMvn resolver.
|
||||
Summary: Module for handling various files for Java packaging
|
||||
Group: Development/Languages/Java
|
||||
Requires: python-lxml
|
||||
%if 0%{?suse_version} <= 1320
|
||||
Requires: python-six
|
||||
%endif
|
||||
|
||||
%description -n python-javapackages
|
||||
Module for handling, querying and manipulating of various files for Java
|
||||
@ -140,9 +132,6 @@ Group: Development/Languages/Java
|
||||
Requires: python3-lxml
|
||||
Obsoletes: python-javapackages < %{version}-%{release}
|
||||
Provides: python-javapackages = %{version}-%{release}
|
||||
%if 0%{?suse_version} <= 1320
|
||||
Requires: python3-six
|
||||
%endif
|
||||
|
||||
%description -n python3-javapackages
|
||||
Module for handling, querying and manipulating of various files for Java
|
||||
@ -162,15 +151,7 @@ This package provides non-essential macros and scripts to support Java packaging
|
||||
|
||||
%prep
|
||||
%setup -q -n javapackages-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%if 0%{?suse_version} > 1320
|
||||
%patch6 -p1
|
||||
%endif
|
||||
%autopatch -p1
|
||||
|
||||
# The usr/lib is hardcoded in configuration files too
|
||||
new_dir=$(echo %{_libdir} | sed 's#/##')
|
||||
@ -264,7 +245,7 @@ popd
|
||||
|
||||
%else
|
||||
|
||||
%files -n javapackages-local -f files-local
|
||||
%files -n javapackages-local -f files-common -f files-extra -f files-compat -f files-generators
|
||||
%dir %{_datadir}/java-utils
|
||||
|
||||
%files -n javapackages-gradle -f files-gradle
|
||||
|
@ -19,12 +19,12 @@ Index: javapackages-5.2.0+git20180620.70fa2258/install
|
||||
-
|
||||
-exec >files-python
|
||||
-(cd ./python && "${pyinterpreter}" setup.py install -O1 --skip-build --prefix "${prefix}" --root "${DEST}") >&2
|
||||
-echo "${prefix}/lib/python?.?/site-packages/javapackages"
|
||||
-echo "${prefix}/lib/python?.?/site-packages/javapackages-*.egg-info"
|
||||
-echo "${prefix}/lib/python*/site-packages/javapackages"
|
||||
-echo "${prefix}/lib/python*/site-packages/javapackages-*.egg-info"
|
||||
Index: javapackages-5.2.0+git20180620.70fa2258/configure-base.sh
|
||||
===================================================================
|
||||
--- javapackages-5.2.0+git20180620.70fa2258.orig/configure-base.sh
|
||||
+++ javapackages-5.2.0+git20180620.70fa2258/configure-base.sh
|
||||
--- javapackages-5.2.0+git20180620.70fa2258.orig/configure
|
||||
+++ javapackages-5.2.0+git20180620.70fa2258/configure
|
||||
@@ -57,7 +57,6 @@ test -z "${rpmconfigdir}" && rpmconfigdi
|
||||
test -z "${rpmmacrodir}" && rpmmacrodir="${rpmconfigdir}/macros.d"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- javapackages-5.3.1/configure-base.sh 2019-06-14 12:26:27.000000000 +0200
|
||||
+++ javapackages-5.3.1/configure-base.sh 2020-07-16 09:04:37.316453132 +0200
|
||||
--- javapackages-5.3.1/configure 2019-06-14 12:26:27.000000000 +0200
|
||||
+++ javapackages-5.3.1/configure 2020-07-16 09:04:37.316453132 +0200
|
||||
@@ -14,6 +14,7 @@
|
||||
root_sysconfdir
|
||||
rpmconfigdir
|
||||
@ -44,7 +44,7 @@ diff -urEbwB javapackages-5.3.1/etc/eclipse.conf javapackages-5.3.1/etc/eclipse.
|
||||
--- javapackages-5.3.1/expand.sh 2019-06-14 12:26:27.000000000 +0200
|
||||
+++ javapackages-5.3.1/expand.sh 2020-07-16 09:04:37.316453132 +0200
|
||||
@@ -45,6 +45,7 @@
|
||||
-e "s|@{scl_suffix}|${scl_suffix}|g" \
|
||||
sed \
|
||||
-e "s|@{bindir}|${bindir}|g" \
|
||||
-e "s|@{datadir}|${datadir}|g" \
|
||||
+ -e "s|@{libdir}|${libdir}|g" \
|
||||
@ -111,22 +111,3 @@ diff -urEbwB javapackages-5.3.1/etc/eclipse.conf javapackages-5.3.1/etc/eclipse.
|
||||
|
||||
#
|
||||
# Root directory where all javadoc is installed. Also already in RH macros.
|
||||
--- javapackages-5.3.1/macros.d/macros.scl-java-template 2019-06-14 12:26:27.000000000 +0200
|
||||
+++ javapackages-5.3.1/macros.d/macros.scl-java-template 2020-07-16 09:04:37.320453154 +0200
|
||||
@@ -50,11 +50,11 @@
|
||||
dir "%{_ivyxmldir}" \
|
||||
dir "%{_sysconfdir}/ivy" \
|
||||
dir "%{_datadir}/maven-metadata" \
|
||||
- dir "%{_prefix}/lib/eclipse" \
|
||||
- dir "%{_prefix}/lib/eclipse/features" \
|
||||
- dir "%{_prefix}/lib/eclipse/plugins" \
|
||||
- dir "%{_prefix}/lib/eclipse/dropins" \
|
||||
- dir "%{_prefix}/lib/eclipse/droplets" \
|
||||
+ dir "%{_libdir}/eclipse" \
|
||||
+ dir "%{_libdir}/eclipse/features" \
|
||||
+ dir "%{_libdir}/eclipse/plugins" \
|
||||
+ dir "%{_libdir}/eclipse/dropins" \
|
||||
+ dir "%{_libdir}/eclipse/droplets" \
|
||||
dir "%{_datadir}/eclipse" \
|
||||
dir "%{_datadir}/eclipse/dropins" \
|
||||
dir "%{_datadir}/eclipse/droplets" \
|
||||
|
Loading…
Reference in New Issue
Block a user