-
Notifications
You must be signed in to change notification settings - Fork 41
Feature/poetry: Add poetry build and publish process whenever a release is tagged #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
343583d
feat: Update project to use poetry for build and wheel packaging
e82bb2a
Merge branch 'main' into feature/poetry
9e5c9d4
ci: Updated tests yaml to run pytests on a gamut of python versions
0b047a5
CI: Download and install pythonwheel artifact
7540eb3
CI: Update tests to install wheel and poetry dependencies
9b9683a
CI: Run dist wheel build for each version of python and test as well
53ebc67
CI: Disable interactive publish
0375667
test: Attempting to update CI
069c87c
test: Attempting to update CI
054923a
Merge branch 'main' into feature/poetry
0c64eec
fix: Update setup python in tests workflow
ca7aa7f
ci: Update tests workflow back to run gcovr and python tests
e77f5fc
fix: Fix pyproject to properly include pythonmonkey.so
8291aa9
ci: Update matrix to include 3.10 and 3.11
02f2fbf
fix: 3.11 is broken, removed from matrix
ead2fd6
fix: Update publish to match test build process
391fe61
ci: Make sure publish doesn't die if existing published version is al…
5e8ea67
Merge main into branch
390479e
ci: Merge test and publish yamls and only run publish on success and tag
737fe50
Merge branch 'main' into feature/poetry
8ca6c49
CI: Fix if statement for running poetry publish. Should only run on t…
3bfb967
Update .github/workflows/test-and-publish.yaml
Hamada-Distributed e091a73
CI: Run workflow only on main, pr's or tags
6f54c23
Merge branch 'feature/poetry' of github.com:Kings-Distributed-Systems…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,6 @@ tests/__pycache__/* | |
tests/python/__pycache__/* | ||
Testing/Temporary | ||
_spidermonkey_install | ||
__pycache__ | ||
dist | ||
*.so |
Xmader marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import subprocess | ||
import os, sys | ||
|
||
dir_path = os.path.dirname( os.path.realpath(__file__) ) | ||
|
||
|
||
def execute(cmd: str): | ||
popen = subprocess.Popen(cmd, stdout = subprocess.PIPE, stderr = subprocess.STDOUT, | ||
shell = True, text = True ) | ||
for stdout_line in iter(popen.stdout.readline, ""): | ||
sys.stdout.write(stdout_line) | ||
sys.stdout.flush() | ||
|
||
popen.stdout.close() | ||
return_code = popen.wait() | ||
if return_code: | ||
raise subprocess.CalledProcessError(return_code, cmd) | ||
|
||
def build(): | ||
build_script_sh = os.path.join( dir_path, 'build_script.sh' ) | ||
execute(f"bash {build_script_sh}") | ||
execute(f"cp ./build/src/pythonmonkey.so ./python/pythonmonkey/pythonmonkey.so") | ||
Xmader marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
if __name__ == "__main__": | ||
build() |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[tool.poetry] | ||
name = "pythonmonkey" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["Caleb Aikens <caleb@distributive.network>", "Tom Tang <xmader@distributive.network>"] | ||
readme = "README.md" | ||
packages = [ | ||
{ include = "pythonmonkey", from = "python" }, | ||
] | ||
include = [ "python/pythonmonkey/pythonmonkey.so" ] | ||
Xmader marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
|
||
|
||
[tool.poetry.build] | ||
script = "build.py" | ||
generate-setup-file = false | ||
|
||
|
||
[tool.poetry.group.dev.dependencies] | ||
pytest = "^7.3.1" | ||
pip = "^23.1.2" | ||
Xmader marked this conversation as resolved.
Show resolved
Hide resolved
|
||
numpy = "^1.24.3" | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0a9"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .pythonmonkey import * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.