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

wrong juliapkg.json path found #17

Open
Roger-luo opened this issue Apr 21, 2023 · 2 comments
Open

wrong juliapkg.json path found #17

Roger-luo opened this issue Apr 21, 2023 · 2 comments

Comments

@Roger-luo
Copy link
Contributor

Roger-luo commented Apr 21, 2023

this is just a standard python package setup as following

.
├── README.md
├── juliapkg.json
├── pdm.lock
├── pdm_build.py
├── pyproject.toml
├── src
│   └── bloqade
│       ├── __init__.py
└── tests
    ├── __init__.py
    ├── test_scalar.py
    └── test_shape.py

where in the bloqade module, it calls juliacall, directly running python test_shape.py will not use juliapkg.json but creates an empty new one. This behavior does not look right.

This is causing things like pytest not working

@Roger-luo
Copy link
Contributor Author

Ok, I realize currently you are doing this by copying juliapkg-dev.json to juliapkg.json in CI...

So it has to live next to the module __init__.py file? Or I'm missing something?

This is really annoying tbh while writing a Python package along with the Julia components because juliapkg-dev.json has to be there, then releasing gets annoying because I will need to run an extra hook to do it.

I don't have a good way of doing this after spending the whole afternoon tweaking pre-build hooks...

@cjdoris
Copy link
Collaborator

cjdoris commented Apr 24, 2023

juliapkg-dev.json is not relevant here - that is simply to force PythonCall and JuliaCall to both be working from the same local version while developing those packages.

However yes you're right that the juliapkg.json file needs to be next to the top __init__.py. This is because files higher up do not necessarily get installed with the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants