From 3dbba4ca252214f42c92f5ef1479db7fc29ef207 Mon Sep 17 00:00:00 2001 From: dh00601 <dh00601@surrey.ac.uk> Date: Tue, 2 Aug 2022 13:19:18 +0100 Subject: [PATCH] updated setup to include core --- setup.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 1f7c72293..c57300eee 100644 --- a/setup.py +++ b/setup.py @@ -31,6 +31,7 @@ def version(): with open("VERSION") as file: return file.read().strip() + def readme(): """ Opens readme file and returns content @@ -39,6 +40,7 @@ def readme(): with open("README.md") as file: return file.read() + def license(): """ Opens license file and returns the content @@ -47,12 +49,13 @@ def license(): with open("LICENSE.md") as file: return file.read() + def requirements(directory): """ Opens requirements.txt and returns content as a list """ - requirements_file = os.path.join(directory, 'requirements.txt') + requirements_file = os.path.join(directory, "requirements.txt") # Read out file and construct list requirements_list = [] @@ -62,6 +65,7 @@ def requirements(directory): return requirements_list + def check_version(installed_binary_c_version, required_binary_c_versions): """Function to check the installed version and compare it to the required version""" message = """ @@ -73,6 +77,7 @@ def check_version(installed_binary_c_version, required_binary_c_versions): ) assert installed_binary_c_version in required_binary_c_versions, message + def execute_make(): """ Function to execute the makefile. @@ -97,12 +102,12 @@ def execute_make(): print(stdout.decode("utf-8")) print("Successfully built the libbinary_c_api.so") + def call_binary_c_config(binary_c_dir, command): """ Function to call the binary_c config """ - binary_c_config = os.path.join(BINARY_C_DIR, "binary_c-config") command_result = ( @@ -113,6 +118,7 @@ def call_binary_c_config(binary_c_dir, command): return command_result + ############################################################ # First level checks ############################################################ @@ -225,6 +231,7 @@ class CustomBuildCommand(distutils.command.build.build): # Run the original build command distutils.command.build.build.run(self) + ############################################################ # Main setup function call ############################################################ @@ -250,6 +257,7 @@ setup( ], # Keywords that define your package best packages=[ "binarycpython", + "binarycpython.core", "binarycpython.utils", "binarycpython.utils.population_extensions", "binarycpython.tests", -- GitLab