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

BLD: use PEP518 for pip install #40

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tylerjereddy
Copy link
Contributor

  • modernize our pip install by using the PEP518
    pyproject.toml configuration, which basically switches
    us to the modern process where pip will first build
    a wheel in an isolated env and then install that binary wheel
    into the current user env

  • note that unfortunately this doesn't really make dealing
    with the friction of needing the complex pykokkos-base
    package any easier, as I describe in
    BLD: providing binary wheels on PyPI pykokkos-base#41

  • we don't actually need pykokkos-base to build
    pykokkos, so much like a user needs to provide a suitable
    version of NumPy when working with SciPy, we need the user
    to provide a suitable version of pykokkos-base separately
    from the build/install of pykokkos; I suspect the best
    way to make this easier would be to provide pykokkos-base
    wheels on PyPI, which I don't see at the moment (likely a substantial
    lift, but could be worth it)

* modernize our `pip install` by using the PEP518
`pyproject.toml` configuration, which basically switches
us to the modern process where `pip` will first build
a wheel in an isolated env and then install that binary wheel
into the current user env

* note that unfortunately this doesn't really make dealing
with the friction of needing the complex `pykokkos-base`
package any easier, as I describe in
kokkos/pykokkos-base#41

* we don't actually need `pykokkos-base` to *build*
`pykokkos`, so much like a user needs to provide a suitable
version of NumPy when working with SciPy, we need the user
to provide a suitable version of `pykokkos-base` *separately*
from the build/install of `pykokkos`; I suspect the best
way to make this easier would be to provide `pykokkos-base`
wheels on PyPI, which I don't see at the moment (likely a substantial
lift, but could be worth it)
@tylerjereddy
Copy link
Contributor Author

I should add, this does make it slightly easier for us to provide wheels for pykokkos if we want to in the future, though building pykokkos from source is fairly easy at the moment anyway.

[project]
dependencies = [
"numpy>=1.19.5",
"pykokkos-base",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that with pip these don't get installed in the user environment automatically, it is basically just metadata about what we need at runtime. Indeed, the idea is to only provide pykokkos into the user env without mutating it in any other way. I believe some other install tools may be able to use this data, though I haven't use them. The NumPy version is based loosely on NEP 29.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, so there's no way to install pykokkos + pykokkos-base with a single pip command?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You could add pykokkos-base to the requires section above and then do i.e., pip install --no-build-isolation, but requires is really only supposed to be used for genuine build requirements.

It still seems to me like the real problem is that pykokkos-base is a pain to install for people outside the project devs.

requires = [
"setuptools<60.0.0",
"wheel",
]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We really need very little to install pykokkos, and it is lightning fast, so no huge advantage to wheels just yet I suppose.

@NaderAlAwar NaderAlAwar changed the base branch from develop to main May 24, 2023 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants