mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-05-07 17:29:50 +00:00
Clean up Makefile & unused files
- Remove requirements-windows.txt as no longer used - Remove srcpkg.sh as not up to date and not used - Minor cleanup in makefile - Update minimum python version to 3.6 in makefile
This commit is contained in:
parent
7f691d3c31
commit
1e12ad8d4c
46
Makefile
46
Makefile
@ -1,7 +1,7 @@
|
|||||||
PYTHON ?= python3
|
PYTHON ?= python3
|
||||||
PYTHON_VERSION_MINOR := $(shell ${PYTHON} -c "import sys; print(sys.version_info.minor)")
|
PYTHON_VERSION_MINOR := $(shell ${PYTHON} -c "import sys; print(sys.version_info.minor)")
|
||||||
PYRCC5 ?= pyrcc5
|
PYRCC5 ?= pyrcc5
|
||||||
REQ_MINOR_VERSION = 4
|
REQ_MINOR_VERSION = 6
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
|
|
||||||
# Window compatability via Msys2
|
# Window compatability via Msys2
|
||||||
@ -15,7 +15,7 @@ ifeq ($(shell ${PYTHON} -c "import platform; print(platform.system())"), Windows
|
|||||||
VENV_OPTIONS =
|
VENV_OPTIONS =
|
||||||
else
|
else
|
||||||
BIN = bin
|
BIN = bin
|
||||||
SO = cpython-3$(PYTHON_VERSION_MINOR)*.so
|
SO = *.so
|
||||||
VENV_OPTIONS = --system-site-packages
|
VENV_OPTIONS = --system-site-packages
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -43,16 +43,16 @@ mofiles = $(patsubst %.po,%.mo,$(pofiles))
|
|||||||
vpath %.po $(localedirs)
|
vpath %.po $(localedirs)
|
||||||
vpath %.mo $(localedirs)
|
vpath %.mo $(localedirs)
|
||||||
|
|
||||||
all : | env i18n modules qt/dg_rc.py
|
all: | env i18n modules qt/dg_rc.py
|
||||||
@echo "Build complete! You can run dupeGuru with 'make run'"
|
@echo "Build complete! You can run dupeGuru with 'make run'"
|
||||||
|
|
||||||
run:
|
run:
|
||||||
$(VENV_PYTHON) run.py
|
$(VENV_PYTHON) run.py
|
||||||
|
|
||||||
pyc:
|
pyc: | env
|
||||||
${PYTHON} -m compileall ${packages}
|
${VENV_PYTHON} -m compileall ${packages}
|
||||||
|
|
||||||
reqs :
|
reqs:
|
||||||
ifneq ($(shell test $(PYTHON_VERSION_MINOR) -gt $(REQ_MINOR_VERSION); echo $$?),0)
|
ifneq ($(shell test $(PYTHON_VERSION_MINOR) -gt $(REQ_MINOR_VERSION); echo $$?),0)
|
||||||
$(error "Python 3.${REQ_MINOR_VERSION}+ required. Aborting.")
|
$(error "Python 3.${REQ_MINOR_VERSION}+ required. Aborting.")
|
||||||
endif
|
endif
|
||||||
@ -63,7 +63,7 @@ endif
|
|||||||
@${PYTHON} -c 'import PyQt5' >/dev/null 2>&1 || \
|
@${PYTHON} -c 'import PyQt5' >/dev/null 2>&1 || \
|
||||||
{ echo "PyQt 5.4+ required. Install it and try again. Aborting"; exit 1; }
|
{ echo "PyQt 5.4+ required. Install it and try again. Aborting"; exit 1; }
|
||||||
|
|
||||||
env : | reqs
|
env: | reqs
|
||||||
ifndef NO_VENV
|
ifndef NO_VENV
|
||||||
@echo "Creating our virtualenv"
|
@echo "Creating our virtualenv"
|
||||||
${PYTHON} -m venv env
|
${PYTHON} -m venv env
|
||||||
@ -73,40 +73,26 @@ ifndef NO_VENV
|
|||||||
${PYTHON} -m venv --upgrade ${VENV_OPTIONS} env
|
${PYTHON} -m venv --upgrade ${VENV_OPTIONS} env
|
||||||
endif
|
endif
|
||||||
|
|
||||||
build/help : | env
|
build/help: | env
|
||||||
$(VENV_PYTHON) build.py --doc
|
$(VENV_PYTHON) build.py --doc
|
||||||
|
|
||||||
qt/dg_rc.py : qt/dg.qrc
|
qt/dg_rc.py: qt/dg.qrc
|
||||||
$(PYRCC5) qt/dg.qrc > qt/dg_rc.py
|
$(PYRCC5) qt/dg.qrc > qt/dg_rc.py
|
||||||
|
|
||||||
i18n: $(mofiles)
|
i18n: $(mofiles)
|
||||||
|
|
||||||
%.mo : %.po
|
%.mo: %.po
|
||||||
msgfmt -o $@ $<
|
msgfmt -o $@ $<
|
||||||
|
|
||||||
core/pe/_block.$(SO) : core/pe/modules/block.c core/pe/modules/common.c
|
modules: | env
|
||||||
$(PYTHON) hscommon/build_ext.py $^ _block
|
$(VENV_PYTHON) build.py --modules
|
||||||
mv _block.$(SO) core/pe
|
|
||||||
|
|
||||||
core/pe/_cache.$(SO) : core/pe/modules/cache.c core/pe/modules/common.c
|
mergepot: | env
|
||||||
$(PYTHON) hscommon/build_ext.py $^ _cache
|
|
||||||
mv _cache.$(SO) core/pe
|
|
||||||
|
|
||||||
qt/pe/_block_qt.$(SO) : qt/pe/modules/block.c
|
|
||||||
$(PYTHON) hscommon/build_ext.py $^ _block_qt
|
|
||||||
mv _block_qt.$(SO) qt/pe
|
|
||||||
|
|
||||||
modules : core/pe/_block.$(SO) core/pe/_cache.$(SO) qt/pe/_block_qt.$(SO)
|
|
||||||
|
|
||||||
mergepot :
|
|
||||||
$(VENV_PYTHON) build.py --mergepot
|
$(VENV_PYTHON) build.py --mergepot
|
||||||
|
|
||||||
normpo :
|
normpo: | env
|
||||||
$(VENV_PYTHON) build.py --normpo
|
$(VENV_PYTHON) build.py --normpo
|
||||||
|
|
||||||
srcpkg :
|
|
||||||
./scripts/srcpkg.sh
|
|
||||||
|
|
||||||
install: all pyc
|
install: all pyc
|
||||||
mkdir -p ${DESTDIR}${PREFIX}/share/dupeguru
|
mkdir -p ${DESTDIR}${PREFIX}/share/dupeguru
|
||||||
cp -rf ${packages} locale ${DESTDIR}${PREFIX}/share/dupeguru
|
cp -rf ${packages} locale ${DESTDIR}${PREFIX}/share/dupeguru
|
||||||
@ -123,7 +109,7 @@ installdocs: build/help
|
|||||||
mkdir -p ${DESTDIR}${PREFIX}/share/dupeguru
|
mkdir -p ${DESTDIR}${PREFIX}/share/dupeguru
|
||||||
cp -rf build/help ${DESTDIR}${PREFIX}/share/dupeguru
|
cp -rf build/help ${DESTDIR}${PREFIX}/share/dupeguru
|
||||||
|
|
||||||
uninstall :
|
uninstall:
|
||||||
rm -rf "${DESTDIR}${PREFIX}/share/dupeguru"
|
rm -rf "${DESTDIR}${PREFIX}/share/dupeguru"
|
||||||
rm -f "${DESTDIR}${PREFIX}/bin/dupeguru"
|
rm -f "${DESTDIR}${PREFIX}/bin/dupeguru"
|
||||||
rm -f "${DESTDIR}${PREFIX}/share/applications/dupeguru.desktop"
|
rm -f "${DESTDIR}${PREFIX}/share/applications/dupeguru.desktop"
|
||||||
@ -134,4 +120,4 @@ clean:
|
|||||||
-rm locale/*/LC_MESSAGES/*.mo
|
-rm locale/*/LC_MESSAGES/*.mo
|
||||||
-rm core/pe/*.$(SO) qt/pe/*.$(SO)
|
-rm core/pe/*.$(SO) qt/pe/*.$(SO)
|
||||||
|
|
||||||
.PHONY : clean srcpkg normpo mergepot modules i18n reqs run pyc install uninstall all
|
.PHONY: clean normpo mergepot modules i18n reqs run pyc install uninstall all
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
PyQt5 >=5.4,<6.0
|
|
||||||
pywin32>=200
|
|
||||||
pyinstaller>=3.4,<4.0
|
|
@ -1,21 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo "Creating git archive"
|
|
||||||
version=`python -c "from hscommon.build import get_module_version; print(get_module_version('core'))"`
|
|
||||||
dest="dupeguru-src-${version}.tar"
|
|
||||||
|
|
||||||
git archive -o ${dest} HEAD
|
|
||||||
|
|
||||||
# Now, we need to include submodules
|
|
||||||
submodules="cocoalib"
|
|
||||||
|
|
||||||
for submodule in $submodules; do
|
|
||||||
echo "Adding submodule ${submodule} to archive"
|
|
||||||
archive_name="${submodule}.tar"
|
|
||||||
git -C ${submodule} archive -o ../${archive_name} --prefix ${submodule}/ HEAD
|
|
||||||
tar -A ${archive_name} -f ${dest}
|
|
||||||
rm ${archive_name}
|
|
||||||
done
|
|
||||||
|
|
||||||
xz ${dest}
|
|
||||||
echo "Built source package ${dest}.xz"
|
|
Loading…
x
Reference in New Issue
Block a user