Skip to content
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

Add pyjion #17937

Merged
merged 38 commits into from
Feb 13, 2022
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
278bd26
Add pyjion
dhirschfeld Feb 4, 2022
d99f9c8
lint
dhirschfeld Feb 4, 2022
b467384
Build for all platforms
dhirschfeld Feb 4, 2022
a7cc965
Add `tonybaloney` as maintainer
dhirschfeld Feb 6, 2022
b605f4b
Add `dotnet/runtime` license
dhirschfeld Feb 6, 2022
a679435
Try enabling tests
dhirschfeld Feb 6, 2022
e8bef65
Force python 3.10 (for testing)
dhirschfeld Feb 6, 2022
fa4317c
Unskip (for testing)
dhirschfeld Feb 6, 2022
db1560e
Fix typo
dhirschfeld Feb 6, 2022
ecd5548
Disable tests
dhirschfeld Feb 6, 2022
41d83f8
Change pin
dhirschfeld Feb 6, 2022
7101769
Add `cxx` compiler
dhirschfeld Feb 6, 2022
5e55982
Add `CMAKE_GENERATOR` env var
dhirschfeld Feb 6, 2022
e501f18
Try using `CMAKE_MAKE_PROGRAM`
dhirschfeld Feb 6, 2022
a808836
wip
dhirschfeld Feb 7, 2022
2385e86
Try adding `make` to build deps
dhirschfeld Feb 7, 2022
c1328a4
Add `libclrjit.so` to `missing_dso_whitelist`
dhirschfeld Feb 7, 2022
47ca906
Try forcing `ninja`
dhirschfeld Feb 7, 2022
a5df7c5
Export `CMAKE_GENERATOR` env var
dhirschfeld Feb 7, 2022
6a601b2
Remove debug cruft
dhirschfeld Feb 7, 2022
24cf525
Try enabling tests
dhirschfeld Feb 7, 2022
a828b5e
Debug `pytest`
dhirschfeld Feb 7, 2022
b33ffdb
wip
dhirschfeld Feb 7, 2022
e346111
wip
dhirschfeld Feb 7, 2022
3920195
Specify `source_files` for tests
dhirschfeld Feb 7, 2022
3e842d2
Remove debug cruft
dhirschfeld Feb 7, 2022
0d6cbbf
Add all tests
dhirschfeld Feb 7, 2022
c3199f4
Add some colour
dhirschfeld Feb 7, 2022
4cd9cd9
Skip external tests
dhirschfeld Feb 7, 2022
7f3bfe9
Re-enable skip and remove Python pins
dhirschfeld Feb 7, 2022
d9432fc
Move `dotnet` to host deps
dhirschfeld Feb 8, 2022
f551622
Link to exact commit for license file
dhirschfeld Feb 8, 2022
b7e93e6
Re-enable skip
dhirschfeld Feb 8, 2022
68cf978
Use `git_rev`
dhirschfeld Feb 8, 2022
f1f3538
Re-run the tests
dhirschfeld Feb 8, 2022
cc3b719
Add `libclrjit.so` to the `missing_dso_whitelist`
dhirschfeld Feb 8, 2022
8f44c0d
Re-enable skip
dhirschfeld Feb 8, 2022
ef6be27
Update recipes/pyjion/meta.yaml
dhirschfeld Feb 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions recipes/pyjion/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{% set name = "pyjion" %}
{% set version = "1.2.6" %}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

The commit hash (tonybaloney/Pyjion@66a772d) could be used instead if there are concerns the tag could change?


package:
name: {{ name|lower }}
version: {{ version }}

source:
git_url: https://github.com/tonybaloney/Pyjion.git
# https://github.com/tonybaloney/Pyjion/tree/1.2.6
git_rev: 66a772d48825e2511b9c6e8bbcc739d84f84e800
dhirschfeld marked this conversation as resolved.
Show resolved Hide resolved


build:
skip: True # [not linux or py<310]
number: 0
missing_dso_whitelist:
- '*/libclrjit.so' # [linux]
script: |
chrisburr marked this conversation as resolved.
Show resolved Hide resolved
git submodule update --init --recursive
export CMAKE_GENERATOR="Ninja"
{{ PYTHON }} -m pip install . -vv
chrisburr marked this conversation as resolved.
Show resolved Hide resolved
entry_points:
- pyjion = pyjion.__main__:main

requirements:
build:
- {{ compiler('cxx') }}
- cmake
dhirschfeld marked this conversation as resolved.
Show resolved Hide resolved
- git
- ninja
host:
- python
dhirschfeld marked this conversation as resolved.
Show resolved Hide resolved
- dotnet >=6
- pip
- setuptools
- wheel
- scikit-build
run:
- python
- dotnet >=6

test:
imports:
- pyjion
requires:
# - distorm3
- django
- flask
- numpy
- pandas
- pyyaml
- pytest >=6.2.5
- rich
- sqlalchemy
source_files:
- Tests/**
commands:
- pytest -v --color=yes Tests/ --opt-level 0
- pytest -v --color=yes Tests/ --opt-level 1
- pytest -v --color=yes Tests/ --opt-level 2
# External tests require distorm3
# - pytest -v --color=yes Tests/ --opt-level 0 --external
# - pytest -v --color=yes Tests/ --opt-level 1 --external

about:
home: https://github.com/tonybaloney/Pyjion
license: MIT
license_family: MIT
license_file: LICENSE.md
summary: 'Pyjion - A JIT for Python based upon CoreCLR'
description: |
Pyjion, a JIT extension for CPython that compiles your Python code
into native CIL and executes it using the .NET CLR.
dev_url: https://github.com/tonybaloney/Pyjion

extra:
recipe-maintainers:
- dhirschfeld
- tonybaloney
31 changes: 31 additions & 0 deletions recipes/pyjion/thirdparty_licenses/dotnet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## `dotnet/runtime` License

*Source:* https://github.com/dotnet/runtime/blob/4822e3c3aa77eb82b2fb33c9321f923cf11ddde6/LICENSE.TXT

----

```
The MIT License (MIT)

Copyright (c) .NET Foundation and Contributors

All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```