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

---
 depgenerators/javadoc.req        | 2 ++
 depgenerators/maven.prov         | 1 +
 depgenerators/maven.req          | 1 +
 depgenerators/osgi.prov          | 1 +
 depgenerators/osgi.req           | 1 +
 java-utils/builddep.py           | 1 +
 java-utils/maven_depmap.py       | 1 +
 java-utils/mvn_alias.py          | 1 +
 java-utils/mvn_artifact.py       | 3 ++-
 java-utils/mvn_build.py          | 1 +
 java-utils/mvn_compat_version.py | 1 +
 java-utils/mvn_config.py         | 1 +
 java-utils/mvn_file.py           | 1 +
 java-utils/mvn_package.py        | 1 +
 java-utils/pom_editor.py         | 1 +
 java-utils/request-artifact.py   | 1 +
 16 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/depgenerators/javadoc.req b/depgenerators/javadoc.req
index 4d182e2e..b300410c 100755
--- a/depgenerators/javadoc.req
+++ b/depgenerators/javadoc.req
@@ -32,6 +32,8 @@
 # Authors:  Michael Simacek <msimacek@redhat.com>
 #           Michal Srb <msrb@redhat.com>
 
+import sys
+sys.path.insert(0, '/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..da67d896 100755
--- a/depgenerators/maven.prov
+++ b/depgenerators/maven.prov
@@ -34,6 +34,7 @@
 
 import sys
 import traceback
+sys.path.insert(0, '/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..00aede89 100755
--- a/depgenerators/maven.req
+++ b/depgenerators/maven.req
@@ -37,6 +37,7 @@ import re
 import sys
 import traceback
 
+sys.path.insert(0, '/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..20fc3ff2 100755
--- a/depgenerators/osgi.prov
+++ b/depgenerators/osgi.prov
@@ -34,6 +34,7 @@
 import sys
 import os
 import traceback
+sys.path.insert(0, '/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..5278c6f9 100755
--- a/depgenerators/osgi.req
+++ b/depgenerators/osgi.req
@@ -34,6 +34,7 @@
 import sys
 import os
 import traceback
+sys.path.insert(0, '/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..475e1bd2 100644
--- a/java-utils/builddep.py
+++ b/java-utils/builddep.py
@@ -33,6 +33,7 @@
 import optparse
 import sys
 
+sys.path.insert(0, '/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 70c1fcf2..3a8317fa 100644
--- a/java-utils/maven_depmap.py
+++ b/java-utils/maven_depmap.py
@@ -46,6 +46,7 @@ import zipfile
 from time import gmtime, strftime
 from copy import deepcopy
 
+sys.path.insert(0, '/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..542ac204 100644
--- a/java-utils/mvn_alias.py
+++ b/java-utils/mvn_alias.py
@@ -33,6 +33,7 @@
 import optparse
 import sys
 
+sys.path.insert(0, '/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..386bda36 100644
--- a/java-utils/mvn_artifact.py
+++ b/java-utils/mvn_artifact.py
@@ -32,6 +32,8 @@
 
 from __future__ import print_function
 
+import sys
+sys.path.insert(0, '/usr/share/java-utils/')
 from javapackages.metadata.metadata import Metadata
 from javapackages.metadata.artifact import MetadataArtifact
 from javapackages.metadata.dependency import MetadataDependency
@@ -45,7 +47,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..1723e2d0 100644
--- a/java-utils/mvn_build.py
+++ b/java-utils/mvn_build.py
@@ -37,6 +37,7 @@ import optparse
 import subprocess
 import sys
 
+sys.path.insert(0, '/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..6ad96d9b 100644
--- a/java-utils/mvn_compat_version.py
+++ b/java-utils/mvn_compat_version.py
@@ -33,6 +33,7 @@
 import optparse
 import sys
 
+sys.path.insert(0, '/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..2f88735a 100644
--- a/java-utils/mvn_config.py
+++ b/java-utils/mvn_config.py
@@ -33,6 +33,7 @@
 import sys
 import optparse
 
+sys.path.insert(0, '/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..7526f95c 100644
--- a/java-utils/mvn_file.py
+++ b/java-utils/mvn_file.py
@@ -33,6 +33,7 @@
 import optparse
 import sys
 
+sys.path.insert(0, '/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..01d9ddda 100644
--- a/java-utils/mvn_package.py
+++ b/java-utils/mvn_package.py
@@ -33,6 +33,7 @@
 import optparse
 import sys
 
+sys.path.insert(0, '/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..bc144f43 100644
--- a/java-utils/pom_editor.py
+++ b/java-utils/pom_editor.py
@@ -11,6 +11,7 @@ import io
 from lxml import etree
 from os import path
 from textwrap import dedent
+sys.path.insert(0, '/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..542e538e 100644
--- a/java-utils/request-artifact.py
+++ b/java-utils/request-artifact.py
@@ -35,6 +35,7 @@ from __future__ import print_function
 
 import sys
 
+sys.path.insert(0, '/usr/share/java-utils/')
 from javapackages.common.mock import (InstallationException, ConnectionException,
                                       install_maven_artifact)
 
-- 
2.21.0