mirror of
				https://github.com/arsenetar/dupeguru.git
				synced 2025-09-11 17:58:17 +00:00 
			
		
		
		
	Update makefile for windows (+2 misc)
- Update the makefile to support windows - Use different bin path in virtualenv - Use pyd instead of so files - Tested with Msys2 - Add *.exe to .gitignore - Fix minor format error in package.py Ref #393
This commit is contained in:
		
							parent
							
								
									0870bf0bfa
								
							
						
					
					
						commit
						3a2f865fca
					
				
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@ -21,3 +21,4 @@ cocoa/autogen
 | 
			
		||||
/help/*/changelog.rst
 | 
			
		||||
 | 
			
		||||
*.pyd
 | 
			
		||||
*.exe
 | 
			
		||||
							
								
								
									
										30
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								Makefile
									
									
									
									
									
								
							@ -2,6 +2,18 @@ PYTHON ?= python3
 | 
			
		||||
REQ_MINOR_VERSION = 4
 | 
			
		||||
PREFIX ?= /usr/local
 | 
			
		||||
 | 
			
		||||
# Window compatability via Msys2 
 | 
			
		||||
# - venv creates Scripts instead of bin
 | 
			
		||||
# - compile generates .pyd instead of .so
 | 
			
		||||
 | 
			
		||||
ifeq ($(shell uname -o), Msys)
 | 
			
		||||
	BIN = Scripts
 | 
			
		||||
	SO = pyd
 | 
			
		||||
else
 | 
			
		||||
	BIN = bin
 | 
			
		||||
	SO = so
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
# Set this variable if all dependencies are already met on the system. We will then avoid the
 | 
			
		||||
# whole vitualenv creation and pip install dance.
 | 
			
		||||
NO_VENV ?=
 | 
			
		||||
@ -9,7 +21,7 @@ NO_VENV ?=
 | 
			
		||||
ifdef NO_VENV
 | 
			
		||||
	VENV_PYTHON = $(PYTHON)
 | 
			
		||||
else
 | 
			
		||||
	VENV_PYTHON = ./env/bin/python
 | 
			
		||||
	VENV_PYTHON = ./env/$(BIN)/python
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
# If you're installing into a path that is not going to be the final path prefix (such as a
 | 
			
		||||
@ -72,19 +84,19 @@ i18n: $(mofiles)
 | 
			
		||||
%.mo : %.po
 | 
			
		||||
	msgfmt -o $@ $<	
 | 
			
		||||
 | 
			
		||||
core/pe/_block.*.so : core/pe/modules/block.c core/pe/modules/common.c | env
 | 
			
		||||
core/pe/_block.*.$(SO) : core/pe/modules/block.c core/pe/modules/common.c | env
 | 
			
		||||
	$(VENV_PYTHON) hscommon/build_ext.py $^ _block
 | 
			
		||||
	mv _block.*.so core/pe
 | 
			
		||||
	mv _block.*.$(SO) core/pe
 | 
			
		||||
 | 
			
		||||
core/pe/_cache.*.so : core/pe/modules/cache.c core/pe/modules/common.c | env
 | 
			
		||||
core/pe/_cache.*.$(SO) : core/pe/modules/cache.c core/pe/modules/common.c | env
 | 
			
		||||
	$(VENV_PYTHON) hscommon/build_ext.py $^ _cache
 | 
			
		||||
	mv _cache.*.so core/pe
 | 
			
		||||
	mv _cache.*.$(SO) core/pe
 | 
			
		||||
 | 
			
		||||
qt/pe/_block_qt.*.so : qt/pe/modules/block.c | env
 | 
			
		||||
qt/pe/_block_qt.*.$(SO) : qt/pe/modules/block.c | env
 | 
			
		||||
	$(VENV_PYTHON) hscommon/build_ext.py $^ _block_qt
 | 
			
		||||
	mv _block_qt.*.so qt/pe
 | 
			
		||||
	mv _block_qt.*.$(SO) qt/pe
 | 
			
		||||
 | 
			
		||||
modules : core/pe/_block.*.so core/pe/_cache.*.so qt/pe/_block_qt.*.so
 | 
			
		||||
modules : core/pe/_block.*.$(SO) core/pe/_cache.*.$(SO) qt/pe/_block_qt.*.$(SO)
 | 
			
		||||
 | 
			
		||||
mergepot :
 | 
			
		||||
	$(VENV_PYTHON) build.py --mergepot
 | 
			
		||||
@ -120,6 +132,6 @@ uninstall :
 | 
			
		||||
clean:
 | 
			
		||||
	-rm -rf build
 | 
			
		||||
	-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
 | 
			
		||||
 | 
			
		||||
@ -167,7 +167,7 @@ def package_windows():
 | 
			
		||||
        options=options,
 | 
			
		||||
        executables=executables,
 | 
			
		||||
        script_args=['build']
 | 
			
		||||
        )
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
def main():
 | 
			
		||||
    args = parse_args()
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user