Skip to content

Commit 04579d6

Browse files
committed
Use abspath when installing data files.
No need to copy Python.Runtime.dll for unittests, it should be installed as part of installing the wheel.
1 parent c42361f commit 04579d6

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

appveyor.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
os: Windows Server 2012
22

3-
environment:
4-
global:
5-
PYTHONPATH: c:\testdir
6-
7-
matrix:
3+
matrix:
84
- pythonurl: http://www.python.org/ftp/python/2.7.6/python-2.7.6.amd64.msi
95
- pythonurl: http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi
106
- pythonurl: http://www.python.org/ftp/python/2.6.6/python-2.6.6.msi
@@ -25,7 +21,5 @@ build_script:
2521

2622
test_script:
2723
- ps: C:\python\scripts\pip.exe install ("dist\" + (gci dist)[0].Name)
28-
- mkdir c:\testdir
29-
- ps: copy-item (gci -path build -re -include Python.Test.dll)[0].FullName c:\testdir
3024
- c:\python\python.exe src\tests\runtests.py
3125
- c:\python\scripts\npython.exe src\tests\runtests.py

setup.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,16 +242,17 @@ class PythonNET_InstallData(install_data):
242242
def run(self):
243243
build_cmd = self.get_finalized_command("build_ext")
244244
install_lib_cmd = self.get_finalized_command("install_lib")
245+
build_dir = os.path.abspath(build_cmd.build_lib)
246+
install_dir = os.path.abspath(install_lib_cmd.install_dir)
245247

246248
for i, data_files in enumerate(self.data_files):
247249
if isinstance(data_files, str):
248-
self.data_files[i] = data_files[i].replace("BUILD_DIR", build_cmd.build_lib)
250+
self.data_files[i] = data_files[i].replace("BUILD_DIR", build_dir)
249251
else:
250252
for j, filename in enumerate(data_files[1]):
251-
data_files[1][j] = filename.replace("BUILD_DIR", build_cmd.build_lib)
252-
dest = data_files[0].replace("INSTALL_DIR", install_lib_cmd.install_dir)
253+
data_files[1][j] = filename.replace("BUILD_DIR", build_dir)
254+
dest = data_files[0].replace("INSTALL_DIR", install_dir)
253255
self.data_files[i] = dest, data_files[1]
254-
print(self.data_files)
255256

256257
return install_data.run(self)
257258

0 commit comments

Comments
 (0)