Minor tweaks to python setup process; update gitignore

This commit is contained in:
Andrew Dutcher 2016-09-12 14:02:14 -07:00
parent 47af3ca190
commit ac99b5bd14
3 changed files with 14 additions and 16 deletions

6
.gitignore vendored
View File

@ -58,6 +58,12 @@ _*.diff
tmp/
bindings/python/build/
bindings/python/dist/
bindings/python/src/
bindings/python/unicorn.egg-info/
bindings/python/unicorn/lib/
bindings/python/unicorn/include/
bindings/python/MANIFEST
config.log

View File

@ -1,30 +1,28 @@
# Python binding for Unicorn engine. Nguyen Anh Quynh <aquynh@gmail.com>
OBJDIR = ./build
.PHONY: gen_const install install3 clean sdist sdist3 bdist bdist3
.PHONY: gen_const install install3 clean sdist sdist3 bdist bdist3 sdist_win bdist_win
gen_const:
cd .. && python const_generator.py python
install:
rm -rf $(OBJDIR) src/
rm -rf src/ dist/
rm -rf prebuilt/win64/unicorn.dll
rm -rf prebuilt/win32/unicorn.dll
if test -n "${DESTDIR}"; then \
python setup.py build -b $(OBJDIR) install --root="${DESTDIR}"; \
python setup.py install --root="${DESTDIR}"; \
else \
python setup.py build -b $(OBJDIR) install; \
python setup.py install; \
fi
install3:
rm -rf $(OBJDIR) src/
rm -rf src/ dist/
rm -rf prebuilt/win64/unicorn.dll
rm -rf prebuilt/win32/unicorn.dll
if test -n "${DESTDIR}"; then \
python3 setup.py build -b $(OBJDIR) install --root="${DESTDIR}"; \
python3 setup.py install --root="${DESTDIR}"; \
else \
python3 setup.py build -b $(OBJDIR) install; \
python3 setup.py install; \
fi
# build & upload PyPi package with source code of the core
@ -68,7 +66,7 @@ sdist3_win:
python3 setup.py sdist register upload
clean:
rm -rf $(OBJDIR) src/ dist/ MANIFEST
rm -rf src/ dist/ build/ MANIFEST
rm -rf prebuilt/win64/unicorn.dll
rm -rf prebuilt/win32/unicorn.dll
rm -rf unicorn/lib unicorn/include

View File

@ -183,12 +183,6 @@ setup(
],
requires=['ctypes'],
cmdclass=cmdclass,
libraries=[(
'unicorn', dict(
package='unicorn',
sources=dummy_src()
),
)],
zip_safe=True,
include_package_data=True,
package_data={