Blob Blame History Raw
From 760c3e7a568295ded8229b06e651915c78475ccd Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 26 Apr 2019 00:50:00 +0200
Subject: [PATCH 1/3] Move python modules under java-utils directory

---
 depgenerators/javadoc.req        | 3 +++
 depgenerators/maven.prov         | 2 ++
 depgenerators/maven.req          | 2 ++
 depgenerators/osgi.prov          | 2 ++
 depgenerators/osgi.req           | 2 ++
 java-utils/builddep.py           | 2 ++
 java-utils/maven_depmap.py       | 2 ++
 java-utils/mvn_alias.py          | 2 ++
 java-utils/mvn_artifact.py       | 4 +++-
 java-utils/mvn_build.py          | 2 ++
 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         | 2 ++
 java-utils/request-artifact.py   | 2 ++
 16 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/depgenerators/javadoc.req b/depgenerators/javadoc.req
index 4d182e2e..8528ee05 100755
--- a/depgenerators/javadoc.req
+++ b/depgenerators/javadoc.req
@@ -32,6 +32,9 @@
 # Authors:  Michael Simacek <msimacek@redhat.com>
 #           Michal Srb <msrb@redhat.com>
 
+import sys
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
 from javapackages.common.config import get_config
 
 config = get_config()
diff --git a/depgenerators/maven.prov b/depgenerators/maven.prov
index 1448cbf6..c794dbea 100755
--- a/depgenerators/maven.prov
+++ b/depgenerators/maven.prov
@@ -34,6 +34,8 @@
 
 import sys
 import traceback
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
 from javapackages.cache.metadata import MetadataCache
 from javapackages.common.util import kill_parent_process, init_rpmgen, get_logger
 
diff --git a/depgenerators/maven.req b/depgenerators/maven.req
index b3597f78..912d5f98 100755
--- a/depgenerators/maven.req
+++ b/depgenerators/maven.req
@@ -37,6 +37,8 @@ import re
 import sys
 import traceback
 
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
 from javapackages.common.config import get_config
 from javapackages.common.util import (kill_parent_process,
                                       init_rpmgen,
diff --git a/depgenerators/osgi.prov b/depgenerators/osgi.prov
index baef6e48..7ed423a2 100755
--- a/depgenerators/osgi.prov
+++ b/depgenerators/osgi.prov
@@ -34,6 +34,8 @@
 import sys
 import os
 import traceback
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
 from javapackages.cache.osgi import OSGiCache
 from javapackages.common.util import kill_parent_process, init_rpmgen, get_logger
 
diff --git a/depgenerators/osgi.req b/depgenerators/osgi.req
index 3cb53302..79dcaaa8 100755
--- a/depgenerators/osgi.req
+++ b/depgenerators/osgi.req
@@ -34,6 +34,8 @@
 import sys
 import os
 import traceback
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
 from javapackages.cache.osgi import OSGiCache
 from javapackages.common.util import kill_parent_process, init_rpmgen, get_logger
 
diff --git a/java-utils/builddep.py b/java-utils/builddep.py
index fda36d2d..48d0963d 100644
--- a/java-utils/builddep.py
+++ b/java-utils/builddep.py
@@ -33,6 +33,8 @@
 import optparse
 import sys
 
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
 from javapackages.maven.artifact import (Artifact, ArtifactFormatException,
                                          ArtifactValidationException)
 from javapackages.common.util import args_to_unicode
diff --git a/java-utils/maven_depmap.py b/java-utils/maven_depmap.py
index 92e0ff4c..9f1472a6 100644
--- a/java-utils/maven_depmap.py
+++ b/java-utils/maven_depmap.py
@@ -46,6 +46,8 @@ import zipfile
 from time import gmtime, strftime
 from copy import deepcopy
 
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
 from javapackages.maven.pom import POM
 from javapackages.metadata.artifact import MetadataArtifact
 from javapackages.metadata.alias import MetadataAlias
diff --git a/java-utils/mvn_alias.py b/java-utils/mvn_alias.py
index 4979a17a..962a35f0 100644
--- a/java-utils/mvn_alias.py
+++ b/java-utils/mvn_alias.py
@@ -33,6 +33,8 @@
 import optparse
 import sys
 
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
 from javapackages.maven.artifact import (Artifact, ArtifactFormatException,
                                          ArtifactValidationException)
 from javapackages.xmvn.xmvn_config import XMvnConfig
diff --git a/java-utils/mvn_artifact.py b/java-utils/mvn_artifact.py
index d135adf2..51339d4b 100644
--- a/java-utils/mvn_artifact.py
+++ b/java-utils/mvn_artifact.py
@@ -32,6 +32,9 @@
 
 from __future__ import print_function
 
+import sys
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
 from javapackages.metadata.metadata import Metadata
 from javapackages.metadata.artifact import MetadataArtifact
 from javapackages.metadata.dependency import MetadataDependency
@@ -45,7 +48,6 @@ from javapackages.xmvn.xmvn_resolve import (XMvnResolve, ResolutionRequest,
 from javapackages.common.util import args_to_unicode
 from javapackages.common.exception import JavaPackagesToolsException
 
-import sys
 import os
 import lxml.etree
 from optparse import OptionParser
diff --git a/java-utils/mvn_build.py b/java-utils/mvn_build.py
index 98479962..4d5f54f7 100644
--- a/java-utils/mvn_build.py
+++ b/java-utils/mvn_build.py
@@ -37,6 +37,8 @@ import optparse
 import subprocess
 import sys
 
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
 from javapackages.maven.artifact import Artifact
 from javapackages.xmvn.xmvn_config import XMvnConfig
 from javapackages.common.util import args_to_unicode, command_exists
diff --git a/java-utils/mvn_compat_version.py b/java-utils/mvn_compat_version.py
index e4afdbd7..d63dcf99 100644
--- a/java-utils/mvn_compat_version.py
+++ b/java-utils/mvn_compat_version.py
@@ -33,6 +33,8 @@
 import optparse
 import sys
 
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
 from javapackages.maven.artifact import (Artifact, ArtifactFormatException,
                                          ArtifactValidationException)
 from javapackages.xmvn.xmvn_config import XMvnConfig
diff --git a/java-utils/mvn_config.py b/java-utils/mvn_config.py
index 7597761e..f7930985 100644
--- a/java-utils/mvn_config.py
+++ b/java-utils/mvn_config.py
@@ -33,6 +33,8 @@
 import sys
 import optparse
 
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
 from javapackages.xmvn.xmvn_config import XMvnConfig
 from javapackages.common.util import args_to_unicode
 from javapackages.common.exception import JavaPackagesToolsException
diff --git a/java-utils/mvn_file.py b/java-utils/mvn_file.py
index 39d1348f..40ae156e 100644
--- a/java-utils/mvn_file.py
+++ b/java-utils/mvn_file.py
@@ -33,6 +33,8 @@
 import optparse
 import sys
 
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
 from javapackages.maven.artifact import (Artifact, ArtifactFormatException,
                                          ArtifactValidationException)
 from javapackages.xmvn.xmvn_config import XMvnConfig, XMvnConfigException
diff --git a/java-utils/mvn_package.py b/java-utils/mvn_package.py
index b74da128..2a2f4619 100644
--- a/java-utils/mvn_package.py
+++ b/java-utils/mvn_package.py
@@ -33,6 +33,8 @@
 import optparse
 import sys
 
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
 from javapackages.maven.artifact import (Artifact, ArtifactFormatException,
                                          ArtifactValidationException)
 from javapackages.xmvn.xmvn_config import XMvnConfig
diff --git a/java-utils/pom_editor.py b/java-utils/pom_editor.py
index 82a555b8..6c09665c 100644
--- a/java-utils/pom_editor.py
+++ b/java-utils/pom_editor.py
@@ -11,6 +11,8 @@ import io
 from lxml import etree
 from os import path
 from textwrap import dedent
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
 from javapackages.common.exception import JavaPackagesToolsException
 
 # all macro fuctions that can be called from external world
diff --git a/java-utils/request-artifact.py b/java-utils/request-artifact.py
index 68cb1119..55dfd985 100644
--- a/java-utils/request-artifact.py
+++ b/java-utils/request-artifact.py
@@ -35,6 +35,8 @@ from __future__ import print_function
 
 import sys
 
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
 from javapackages.common.mock import (InstallationException, ConnectionException,
                                       install_maven_artifact)
 
-- 
2.21.0