fded6ce46cb167faaae559ff93b050c2b7d18ff1
max
  Mon Jun 26 08:59:00 2023 -0700
Porting hgGeneGraph to python3. refs #31563

diff --git src/hg/pyLib/makefile src/hg/pyLib/makefile
index 769b5a8..5c6bc81 100644
--- src/hg/pyLib/makefile
+++ src/hg/pyLib/makefile
@@ -2,45 +2,37 @@
 include ../../inc/common.mk
 
 #cannot use common include rules, don't know how to overwrite :: targets
 #include ../../inc/cgi_build_rules.mk
 
 ifeq (${CGI_BIN_USER},)
     CGI_BIN_USER=${CGI_BIN}-${USER}
 endif
 
 ifeq (${CGI_BIN_BETA},)
     CGI_BIN_BETA=${CGI_BIN}-beta
 endif
 
 my:: compile 
 	mkdir -p ${CGI_BIN_USER}/pyLib/
-	rm -f ${CGI_BIN_USER}/pyLib/{hgLib.{py,pyc,pyo},six.*} 
-	cp -p hgLib.py ${CGI_BIN_USER}/pyLib/hgLib.py
-	cp -p hgLib.pyo ${CGI_BIN_USER}/pyLib/hgLib.pyo
-	cp -p six.* ${CGI_BIN_USER}/pyLib/
+	rsync --whole-file --times --recursive --omit-dir-times --relative ./ ${CGI_BIN_USER}/pyLib/ --exclude=makefile --exclude=README.txt
 	
 beta:: compile
 	mkdir -p ${CGI_BIN_BETA}/pyLib/
-	rm -f ${CGI_BIN_BETA}/pyLib/{hgLib.{py,pyc,pyo},six.*} 
-	cp -p hgLib.py ${CGI_BIN_BETA}/pyLib/hgLib.py
-	cp -p hgLib.pyo ${CGI_BIN_BETA}/pyLib/hgLib.pyo
-	cp -p six.* ${CGI_BIN_BETA}/pyLib/
+	rsync --whole-file --times --recursive --omit-dir-times --relative ./ ${CGI_BIN_BETA}/pyLib/ --exclude=makefile --exclude=README.txt
 	
 alpha:: compile
 	mkdir -p ${CGI_BIN}/pyLib/
-	rm -f ${CGI_BIN}/pyLib/{hgLib.{py,pyc,pyo},six.*} 
-	cp -p hgLib.py ${CGI_BIN}/pyLib/hgLib.py
-	cp -p hgLib.pyo ${CGI_BIN}/pyLib/hgLib.pyo
-	cp -p six.* ${CGI_BIN}/pyLib/
+	rsync --whole-file --times --recursive --omit-dir-times --relative ./ ${CGI_BIN}/pyLib/ --exclude=makefile --exclude=README.txt
 	
 compile:
 	# byte-compile and strip all python source code to .pyo files
-	python2.7 -OO -m compileall ./
+	python3 -OO -m compileall ./
 
 clean::
 	rm -f *.pyc *.pyo
+	rm -rf __pycache__ pymysql/__pycache__ pymysql/constants/__pycache__
 
 lint::
-	pylint -E hgLib.py
+	pylint -E hgLib3.py
 
 install::