commit:     d0b44f97d5c5307cbf165855a34bcd366d266a96
Author:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 23 13:19:28 2020 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Tue Jun 23 13:25:39 2020 +0000
URL:        https://gitweb.gentoo.org/proj/java-config.git/commit/?id=d0b44f97

move eprefix declaration up and use it when installing files

Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 setup.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/setup.py b/setup.py
index ff50b37..b796fe2 100644
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,6 @@
 package_version = '2.2.0'
 #######################################
 
-
 from distutils.cmd import Command
 from distutils.command.build import build
 from distutils.command.install import install
@@ -19,6 +18,9 @@ import tempfile
 import unittest
 
 
+eprefix = os.getenv('EPREFIX', '')
+
+
 class jc_build(build):
        def run(self):
                build.run(self)
@@ -82,15 +84,13 @@ class jc_install(install):
                with tempfile.NamedTemporaryFile(mode='w', delete=False) as f:
                        f.write("# Supported JDKs\n")
                        f.write(defaults + "\n")
-               confdir = self.root + '/usr/share/java-config-2/config/'
+               confdir = self.root + eprefix + 
'/usr/share/java-config-2/config/'
                self.mkpath(confdir)
                self.copy_file(f.name, confdir + 'jdk-defaults.conf', 
preserve_mode=0)
                os.remove(f.name)
 
 from distutils.core import setup
 
-eprefix = os.getenv('EPREFIX', '')
-
 setup(
        cmdclass = {
                'build' : jc_build,

Reply via email to