Skip to content

Commit 60b0d63

Browse files
committed
[ci skip] Fix makefile, update builtins operation
1 parent b91c1e5 commit 60b0d63

File tree

2 files changed

+33
-13
lines changed

2 files changed

+33
-13
lines changed

Makefile

+32-12
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,37 @@
1-
.PHONY: test sdist bdist_egg_linux bdist_windows
1+
.PHONY: test sdist bdist_wheel_linux bdist_windows
2+
3+
clean:
4+
python setup.py clean
5+
6+
fresh_toolchain:
7+
python -m pip install -U pip setuptools
8+
9+
check_docs: fresh_toolchain
10+
pip install -U collective.checkdocs
11+
python setup.py checkdocs
12+
213
test:
314
tox
4-
sdist:
5-
python setup.py sdist -formats zip
6-
bdist_egg_linux:
15+
16+
sdist: clean fresh_toolchain check_docs
17+
python setup.py sdist --formats zip
18+
19+
bdist_wheel_linux: clean
720
./tools/run_docker.sh "threaded"
8-
bdist_rpm:
9-
`find /usr/bin /usr/local/bin ~/.gem -name fpm -executable -type f -print -quit` -s python -t rpm .
10-
bdist_deb:
11-
`find /usr/bin /usr/local/bin ~/.gem -name fpm -executable -type f -print -quit` -s python -t deb .
12-
bdist_windows:
13-
python -m pip install -U pip setuptools
21+
22+
bdist_rpm: clean fresh_toolchain check_docs
23+
@FPM=$$(find /usr/bin /usr/local/bin ~/.gem -name fpm -executable -type f -print -quit);\
24+
echo "Use FPM in $$FPM";\
25+
$$FPM -s python -t rpm --python-pip pip .
26+
27+
bdist_deb: clean fresh_toolchain check_docs
28+
@FPM=$$(find /usr/bin /usr/local/bin ~/.gem -name fpm -executable -type f -print -quit);\
29+
echo "Use FPM in $$FPM";\
30+
$$FPM -s python -t deb --python-pip pip .
31+
32+
bdist_windows: clean fresh_toolchain check_docs
1433
pip install wheel==0.26
1534
pip install -U -r build_requirements.txt
16-
python setup.py bdist_wheel
17-
ALL: test
35+
python setup.py bdist_wheel bdist_wininst
36+
37+
ALL: clean test

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def run(self):
107107
shutil.copyfile(src, dst)
108108
except (
109109
distutils.errors.DistutilsPlatformError,
110-
globals()['__builtins__'].get('FileNotFoundError', OSError)
110+
getattr(globals()['__builtins__'], 'FileNotFoundError', OSError)
111111
):
112112
raise BuildFailed()
113113

0 commit comments

Comments
 (0)