aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrice Clement <monsieurp@gentoo.org>2020-06-23 15:19:28 +0200
committerPatrice Clement <monsieurp@gentoo.org>2020-06-23 15:25:39 +0200
commitd0b44f97d5c5307cbf165855a34bcd366d266a96 (patch)
tree169f8eea8986ed6dc5435478db3286049f157159
parentcut java-config 2.3 release (diff)
downloadjava-config-d0b44f97d5c5307cbf165855a34bcd366d266a96.tar.gz
java-config-d0b44f97d5c5307cbf165855a34bcd366d266a96.tar.bz2
java-config-d0b44f97d5c5307cbf165855a34bcd366d266a96.zip
move eprefix declaration up and use it when installing files
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
-rw-r--r--setup.py8
1 files 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,