Skip to content

Commit

Permalink
more consistently place jep jar on install
Browse files Browse the repository at this point in the history
remove using distutils.install_data for jar
instead use our custom install_lib for jar
  • Loading branch information
ndjensen committed Jun 12, 2015
1 parent 643f6bc commit f9ca601
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 0 additions & 2 deletions commands/install.py
Expand Up @@ -8,8 +8,6 @@

class post_install(install_data):
def run(self):
install_data.run(self)

py_lib = get_python_lib_dir()

# Get the "--root" directory supplied to the "install" command,
Expand Down
9 changes: 9 additions & 0 deletions commands/install_lib.py
Expand Up @@ -8,6 +8,7 @@
class jep_install(install_lib):

def install(self):
version = self.distribution.metadata.get_version()
py_lib = get_python_lib_dir()
if is_windows():
jep_lib = 'jep.pyd'
Expand All @@ -27,6 +28,14 @@ def install(self):
lib_copied = self.copy_file(
os.path.join(self.build_dir, jep_lib),
os.path.join(py_lib, jep_lib))

# let's copy the jar file too
jar_dir = os.path.join(py_lib, 'jep')
if not os.path.exists(jar_dir):
os.makedirs(jar_dir)
jar_copied = self.copy_file(
os.path.join('build', 'java', 'jep-{0}.jar'.format(version)),
os.path.join(jar_dir, 'jep-{0}.jar'.format(version)))

# let's copy the jep package to site-packages
return self.copy_tree(
Expand Down
2 changes: 1 addition & 1 deletion jep/version.py
@@ -1,2 +1,2 @@
__VERSION__ = '3.3.3'
__VERSION__ = '3.3.4'
VERSION = __VERSION__
5 changes: 0 additions & 5 deletions setup.py
Expand Up @@ -121,10 +121,5 @@ def read_file(name):
'clean': really_clean,
'test': test,
},

# a list of other files to install
data_files=[
('lib/jep', ['build/java/jep-{0}.jar'.format(VERSION)]),
]
)

0 comments on commit f9ca601

Please sign in to comment.