diff --git a/gen/Makefile b/gen/Makefile index 1f001c8..7522ced 100644 --- a/gen/Makefile +++ b/gen/Makefile @@ -10,7 +10,7 @@ PYTHON_ARTIFACTS += ./tests/__pycache__ .PHONY: all build dist dist-egg dist-whl install install-user install-test venv envtest test develop examples clean clean-all -all: dist +all: dist example-libs # Build # ===== @@ -67,8 +67,8 @@ develop: # Examples # ======== # Use these targets only in venv created with 'make venv' -examples: - $(MAKE) -C examples/ all +example-libs: + $(MAKE) -C examples/lib all # Housekeeping # ============ @@ -76,6 +76,7 @@ clean-all: clean rm -rf $(VENV_DIR) clean: + $(MAKE) -C examples/lib clean rm -rf $(BUILD_DIR) rm -rf $(DIST_DIR) rm -rf $(PYTHON_ARTIFACTS) diff --git a/gen/examples/Makefile b/gen/examples/Makefile deleted file mode 100644 index ffb7640..0000000 --- a/gen/examples/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -.PHONY: all - -all: - $(MAKE) -C lib/lib_test/ - $(MAKE) -C lib/lib_synth_shed/ - $(MAKE) -C ext/synth_shed/synth_shed/ - -clean: - $(MAKE) -C lib/lib_test/ clean - $(MAKE) -C lib/lib_synth_shed/ clean - $(MAKE) -C ext/synth_shed/synth_shed/ clean - -clean-all: - $(MAKE) -C lib/lib_test/ clean - $(MAKE) -C lib/lib_synth_shed/ clean - $(MAKE) -C ext/synth_shed/synth_shed/ clean diff --git a/gen/examples/ext/synth_shed/Makefile b/gen/examples/ext/synth_shed/Makefile index 76dd31f..ff42920 100644 --- a/gen/examples/ext/synth_shed/Makefile +++ b/gen/examples/ext/synth_shed/Makefile @@ -80,10 +80,10 @@ clean-all: clean rm -rf $(VENV_DIR) clean: + $(MAKE) -C synth_shed/ clean rm -rf $(BUILD_DIR) rm -rf $(DIST_DIR) rm -rf $(PYTHON_ARTIFACTS) - rm -rf $(VERSION_FILE) rm -rf $(BUILD_INPLACE) diff --git a/gen/examples/ext/synth_shed/Makefile.conf b/gen/examples/ext/synth_shed/Makefile.conf index 14612ac..9db454d 100644 --- a/gen/examples/ext/synth_shed/Makefile.conf +++ b/gen/examples/ext/synth_shed/Makefile.conf @@ -3,18 +3,8 @@ HERE:=$(dir $(lastword $(MAKEFILE_LIST))) # Constants BUILD_DIR = ./build DIST_DIR = ./dist -BUILD_INPLACE = ./src/synth_shed/syth_shed.cpython-38-darwin.so +BUILD_INPLACE = ./synth_shed/syth_shed.cpython-38-darwin.so PYTHON_ARTIFACTS += ./.eggs -PYTHON_ARTIFACTS += ./src/syth_shed.egg-info +PYTHON_ARTIFACTS += ./synth_shed.egg-info PYTHON_ARTIFACTS += ./.pytest_cache VENV_DIR = ./venv - -# Build config Defaults -PREFIX= - -######### Overrides ######### --include $(HERE)local.conf - -ifneq ($(PREFIX),) - PREFIX_OPT += --prefix=$(PREFIX) -endif diff --git a/gen/examples/ext/synth_shed/pyproject.toml b/gen/examples/ext/synth_shed/pyproject.toml index 650382a..3691cdb 100644 --- a/gen/examples/ext/synth_shed/pyproject.toml +++ b/gen/examples/ext/synth_shed/pyproject.toml @@ -1,10 +1,9 @@ - [build-system] # Preparing for PEP-517/PEP-518, but not in effect yet. # These requires are not effective yet, setup.cfg is. -requires =[ - "setuptools >=39.2.0", - "wheel >= 0.35.1" ] +requires = [ + "setuptools >=39.2.0", + "wheel >= 0.35.1", ] build-backend = "setuptools.build_meta" diff --git a/gen/examples/ext/synth_shed/requirements.txt b/gen/examples/ext/synth_shed/requirements.txt index c24a2e1..ded7134 100644 --- a/gen/examples/ext/synth_shed/requirements.txt +++ b/gen/examples/ext/synth_shed/requirements.txt @@ -1 +1,2 @@ pEpACIDgen +pyBind11 diff --git a/gen/examples/ext/synth_shed/setup.py b/gen/examples/ext/synth_shed/setup.py index 9dff39e..a011bb6 100755 --- a/gen/examples/ext/synth_shed/setup.py +++ b/gen/examples/ext/synth_shed/setup.py @@ -1,19 +1,15 @@ # -*- coding: utf-8 -*- # This file is under GNU Affero General Public License 3.0 # see LICENSE.txt - from setuptools import setup, Extension -# import pybind11.setup_helpers - - ext_modules = [ Extension( "synth_shed", ["synth_shed/synth_shed.cc"], include_dirs=['../../lib/lib_synth_shed', '/opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8', - '/Users/heck/src/adapter/pEpPythonAdapter-new/gen/examples/ext/synth_shed/venv/lib/python3.8/site-packages/pybind11/include'], + 'venv/lib/python3.8/site-packages/pybind11/include'], extra_compile_args=['-std=c++11'], libraries=['synth_shed'], library_dirs=['../../lib/lib_synth_shed/'] diff --git a/gen/examples/lib/Makefile b/gen/examples/lib/Makefile new file mode 100644 index 0000000..d378682 --- /dev/null +++ b/gen/examples/lib/Makefile @@ -0,0 +1,9 @@ +.PHONY: all + +all: + $(MAKE) -C lib_test/ + $(MAKE) -C lib_synth_shed/ + +clean: + $(MAKE) -C lib_test/ clean + $(MAKE) -C lib_synth_shed/ clean diff --git a/gen/setup.cfg b/gen/setup.cfg index d346bb1..cbd2923 100644 --- a/gen/setup.cfg +++ b/gen/setup.cfg @@ -36,6 +36,7 @@ setup_requires = install_requires = clang yml2 + pybind11 >= 2.6.1 [options.entry_points] console_scripts =