Skip to content
Snippets Groups Projects
Commit 3dbba4ca authored by dh00601's avatar dh00601
Browse files

updated setup to include core

parent c553286a
No related branches found
No related tags found
No related merge requests found
......@@ -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",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment