Skip to content

Commit 746eb0d

Browse files
authored
Merge pull request #3394 from ales-erjavec/fixes/setup-data-files
[FIX] setup.py: Remove trailing slash from directory names in data_files
2 parents d97871e + f53b5e8 commit 746eb0d

File tree

3 files changed

+13
-19
lines changed

3 files changed

+13
-19
lines changed

.ci_tools/appveyor/patch-vcvars.bat

Lines changed: 0 additions & 10 deletions
This file was deleted.

appveyor.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ environment:
1818
# disable threaded builds on Python 3.5+ when using numpy's distutils
1919
# (https://github.com/numpy/numpy/issues/7607)
2020
BUILD_GLOBAL_OPTIONS: build -j1
21-
BUILD_ENV: wheel==0.29.0 pip==9.0.1 numpy==1.9.3
21+
BUILD_ENV: wheel==0.29.0 pip==9.0.1 numpy==1.9.3 sphinx==1.8.2
2222
# SIP 4.19.4+ with PyQt5==5.9.1+ segfault our tests (GH-2756)
2323
TEST_ENV: sip==4.19.6 PyQt5==5.9.2 numpy~=1.14.0 scipy~=1.0.0 scikit-learn pandas==0.21.1
2424

@@ -28,20 +28,18 @@ environment:
2828
- PYTHON: C:\Python36-x64
2929

3030
- PYTHON: C:\Python37
31-
BUILD_ENV: wheel==0.29.0 pip~=9.0.1 numpy~=1.14.0
31+
BUILD_ENV: wheel==0.29.0 pip~=9.0.1 numpy~=1.14.0 sphinx==1.8.2
3232
# PyQt5 >= 5.11 32-bit no longer contains QtWebEngine
3333
TEST_ENV: PyQt5~=5.10.0 numpy~=1.14.0 scipy~=1.1.0 scikit-learn pandas
3434

3535
- PYTHON: C:\Python37-x64
36-
BUILD_ENV: wheel==0.29.0 pip~=9.0.1 numpy~=1.14.0
36+
BUILD_ENV: wheel==0.29.0 pip~=9.0.1 numpy~=1.14.0 sphinx==1.8.2
3737
TEST_ENV: PyQt5~=5.11.1 numpy~=1.14.0 scipy~=1.1.0 scikit-learn pandas
3838

3939
cache:
4040
- '%LOCALAPPDATA%\pip\cache -> appveyor.yml'
4141

4242
install:
43-
# Patch VC 2010 64-bit toolchain
44-
- call .ci_tools/appveyor/patch-vcvars.bat
4543
# Configure pip: Add extra links url, force binary numpy, scipy, ...
4644
- echo [install]> pip.ini
4745
- echo find-links =>> pip.ini

setup.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def initialize_options(self):
248248

249249

250250
# ${prefix} relative install path for html help files
251-
DATAROOTDIR = "share/help/en/orange3/htmlhelp/"
251+
DATAROOTDIR = "share/help/en/orange3/htmlhelp"
252252

253253

254254
def findall(startdir, followlinks=False, ):
@@ -271,9 +271,15 @@ def find_htmlhelp_files(subdir):
271271
)
272272
for file in files:
273273
relpath = os.path.relpath(file, start=subdir)
274-
data_files.append(
275-
(os.path.join(DATAROOTDIR, os.path.dirname(relpath)), [file])
276-
)
274+
relsubdir = os.path.dirname(relpath)
275+
# path.join("a", "") results in "a/"; distutils install_data does not
276+
# accept paths that end with "/" on windows.
277+
if relsubdir:
278+
targetdir = os.path.join(DATAROOTDIR, relsubdir)
279+
else:
280+
targetdir = DATAROOTDIR
281+
assert not targetdir.endswith("/")
282+
data_files.append((targetdir, [file]))
277283
return data_files
278284

279285

0 commit comments

Comments
 (0)