DIST2 = /usr/local/lib/python2.7/dist-packages DIST3 = /usr/local/lib/python3.5/dist-packages BIN = /usr/local/bin .PHONY: all all: py2 py3 localBin ls -lR python2.7 python3.5 bin .PHONY: py2 py2: google_cloud_storage.py2 inotify.py2 python_magic.py2 xmltodict.py2 opencli.py2 rsync -a --verbose ${DIST2}/ python2.7 .PHONY: py3 py3: google_cloud_storage.py3 inotify.py3 python_magic.py3 xmltodict.py3 opencli.py3 rsync -a --verbose ${DIST3}/ python3.5 .PHONY: localBin localBin: google_cloud_storage.py3 inotify.py3 python_magic.py3 xmltodict.py3 opencli.py3 (cd ${BIN} && find \! -type d) | sort > bin.updated comm -13 bin.base bin.updated | tee bin.files rsync -a --verbose --files-from bin.files ${BIN} bin # These pattern rules will automatically install the python module, then detect what was written and rsync it to the install directory %.py2 : | python2.7 bin pip2 install modules/$*-${TAG}* -vvv touch $@ %.py3 : | python3.5 bin pip3 install modules/$*-${TAG}* -vvv touch $@ # Create the install directories python2.7 : rm -rf $@ mkdir $@ python3.5 : rm -rf $@ mkdir -p $@/__pycache__ mkdir -p ${DIST3}/__pycache__ bin : rm -rf $@ mkdir $@ (cd ${BIN} && find \! -type d) | sort > $@.base # Now create two lines fore each python module to install. # The first line is the package version (TAG) # The second line lists the python module's dependencies. # Note: if both py2 and py3 use the same tag, you can combine the lines bravado.py2 bravado.py3 : TAG=10.3.2 bravado.py2 : bravado_core.py2 msgpack-python.py2 python_dateutil.py2 PyYAML.py2 requests.py2 six.py2 simplejson.py2 monotonic.py2 typing_extensions.py2 bravado.py3 : bravado_core.py3 msgpack-python.py3 python_dateutil.py3 PyYAML.py3 requests.py3 six.py3 simplejson.py3 monotonic.py3 typing_extensions.py3 bravado_core.py2 bravado_core.py3 : TAG=5.15.0 bravado_core.py2 : jsonref.py2 jsonschema.py2 python_dateutil.py2 PyYAML.py2 simplejson.py2 six.py2 swagger_spec_validator.py2 pytz.py2 msgpack-python.py2 functools32.py2 enum34.py2 typing.py2 bravado_core.py3 : jsonref.py3 jsonschema.py3 python_dateutil.py3 PyYAML.py3 simplejson.py3 six.py3 swagger_spec_validator.py3 pytz.py3 msgpack-python.py3 cachetools.py2 cachetools.py3 : TAG=3.1.1 certifi.py2 certifi.py3 : TAG=2019.9.11 chardet.py2 chardet.py3 : TAG=3.0.4 enum34.py2 enum34.py3 : TAG=1.1.9 fire.py2 fire.py3 : TAG=0.1.3 fire.py2 : six.py2 fire.py3 : six.py3 functools32.py2 functools32.py3 : TAG=3.2.3-2 # futures is py2 only futures.py2 : TAG=3.3.0 google_api_core.py2 google_api_core.py3 : TAG=1.14.3 google_api_core.py2 : futures.py2 setuptools.py2 requests.py2 protobuf.py2 pytz.py2 googleapis-common-protos.py2 google_api_core.py3 : setuptools.py3 requests.py3 protobuf.py3 pytz.py3 googleapis-common-protos.py3 google_auth.py2 google_auth.py3 : TAG=1.6.3 google_auth.py2 : pyasn1_modules.py2 rsa.py2 cachetools.py2 google_auth.py3 : pyasn1_modules.py3 rsa.py3 cachetools.py3 google_cloud_core.py2 google_cloud_core.py3 : TAG=1.0.3 google_cloud_core.py2 : google_api_core.py2 google_cloud_core.py3 : google_api_core.py3 google_cloud_storage.py2 google_cloud_storage.py3 : TAG=1.20.0 google_cloud_storage.py2 : google_resumable_media.py2 google_auth.py2 google_cloud_core.py2 google_cloud_storage.py3 : google_resumable_media.py3 google_auth.py3 google_cloud_core.py3 google_resumable_media.py2 google_resumable_media.py3 : TAG=0.4.1 google_resumable_media.py2 : six.py2 google_resumable_media.py3 : six.py3 googleapis-common-protos.py2 googleapis-common-protos.py3 : TAG=1.6.0 idna.py2 idna.py3 : TAG=2.8 inotify.py2 inotify.py3 : TAG=0.2.10 inotify.py2 : nose.py2 inotify.py3 : nose.py3 jsonref.py2 jsonref.py3 : TAG=0.2 jsonschema.py2 jsonschema.py3 : TAG=2.5.1 jsonschema.py2 : functools32.py2 strict-rfc3339.py2 webcolors.py2 rfc3987.py2 jsonschema.py3 : strict-rfc3339.py3 webcolors.py3 rfc3987.py3 monotonic.py2 monotonic.py3 : TAG=1.5 msgpack-python.py2 msgpack-python.py3 : TAG=0.5.6 nose.py2 nose.py3 : TAG=1.3.7 opencli.py2 opencli.py3 : TAG=0.0.10.dev1+ntap opencli.py2 : fire.py2 bravado.py2 tabulate.py2 prompt_toolkit.py2 pbr.py2 setuptools_scm.py2 opencli.py3 : fire.py3 bravado.py3 tabulate.py3 prompt_toolkit.py3 pbr.py3 setuptools_scm.py3 pbr.py2 pbr.py3 : TAG=4.0.3 prompt_toolkit.py2 prompt_toolkit.py3 : TAG=1.0.15 prompt_toolkit.py2 : six.py2 wcwidth.py2 prompt_toolkit.py3 : six.py3 wcwidth.py3 protobuf.py2 protobuf.py3 : TAG=3.10.0 pyasn1.py2 pyasn1.py3 : TAG=0.4.7 pyasn1_modules.py2 pyasn1_modules.py3 : TAG=0.2.7 pyasn1_modules.py2 : pyasn1.py2 pyasn1_modules.py3 : pyasn1.py3 python_dateutil.py2 python_dateutil.py3 : TAG=2.8.1 python_dateutil.py2 : six.py2 python_dateutil.py3 : six.py3 python_magic.py2 python_magic.py3 : TAG=0.4.15 pytz.py2 pytz.py3 : TAG=2019.3 PyYAML.py2 PyYAML.py3 : TAG=5.3 requests.py2 requests.py3 : TAG=2.22.0 requests.py2 : urllib3.py2 certifi.py2 idna.py2 chardet.py2 requests.py3 : urllib3.py3 certifi.py3 idna.py3 chardet.py3 rfc3987.py2 rfc3987.py3 : TAG=1.3.8 rsa.py2 rsa.py3 : TAG=4.0 setuptools.py2 setuptools.py3 : TAG=41.4.0 setuptools_scm.py2 setuptools_scm.py3 : TAG=1.15.6 simplejson.py2 simplejson.py3 : TAG=3.17.0 six.py2 six.py3 : TAG=1.12.0 strict-rfc3339.py2 strict-rfc3339.py3 : TAG=0.7 swagger_spec_validator.py2 swagger_spec_validator.py3 : TAG=2.5.0 swagger_spec_validator.py2 : jsonschema.py2 PyYAML.py2 six.py2 swagger_spec_validator.py3 : jsonschema.py3 PyYAML.py3 six.py3 tabulate.py2 tabulate.py3 : TAG=0.8.2 tabulate.py3 : wcwidth.py3 typing.py2 typing.py3 : TAG=3.7.4.1 typing_extensions.py2 typing_extensions.py3 : TAG=3.7.4.1 typing_extensions.py2 : typing.py2 # typing_extensions.py3 does not need typing.py3 typing_extensions.py3 : urllib3.py2 urllib3.py3 : TAG=1.25.6 wcwidth.py2 wcwidth.py3 : TAG=0.1.8 webcolors.py2 webcolors.py3 : TAG=1.10 xmltodict.py2 xmltodict.py3 : TAG=0.12.0