polars icon indicating copy to clipboard operation
polars copied to clipboard

build python wheel faild: No rule to make target `build'

Open uuip opened this issue 1 year ago • 6 comments

Checks

  • [X] I have checked that this issue has not already been reported.
  • [X] I have confirmed this bug exists on the latest version of Polars.

Reproducible example

1. download src code from pypi: https://files.pythonhosted.org/packages/46/be/0450264d087e43ccbd72732054e8a79da6a247b3e5ad034fc4ae5ecf979e/polars-0.20.20.tar.gz
2. unpack and follow https://github.com/pola-rs/polars?tab=readme-ov-file#python-compile-polars-from-source

Log output

Downloads/polars-0.20.20/py-polars [📦 v0.20.20][🦀 v1.79.0-nightly]
❯ cargo version
cargo 1.79.0-nightly (499a61ce7 2024-03-26)

Downloads/polars-0.20.20/py-polars [📦 v0.20.20][🦀 v1.79.0-nightly]
❯ make build
make[1]: *** No rule to make target `build'.  Stop.
make: *** [build] Error 2

Issue description

I has run "make buid" on Macos14, and within docker container, all has failed.

Maybe something I lost?

Expected behavior

make build should work fine.

Installed versions

polars-0.20.20 from pypi and 0.39.0 release from github

uuip avatar Apr 15 '24 09:04 uuip

The readme needs to be updated. make build does no longer exist.

ritchie46 avatar Apr 15 '24 10:04 ritchie46

The readme needs to be updated. make build does no longer exist.

I don't think that's true. There is a make build command, both at the top-level and in py-polars. I use it all the time 😄

I think the issue is that this person downloads the source from our release, and it does not include a Makefile.

stinodego avatar Apr 22 '24 19:04 stinodego

I did a test again, this is step how I run build. @stinodego Maybe you have a full dev environment. There is a "Makefile", but all command start with "build" failed.

make build,build-opt failed. make clippy ok.

iShot_2024-04-23_10 10 58

uuip avatar Apr 23 '24 02:04 uuip

Seems that we don't have the Makefile in the unpacked top-level folder, but we do have it in the py-polars folder. It can't work if parent Makefile didn't exist.

reswqa avatar Apr 23 '24 04:04 reswqa

Seems that we don't have the Makefile in the unpacked top-level folder, but we do have it in the py-polars folder. It can't work if parent Makefile didn't exist.

Yes, that's it.

What I think should happen:

  • (Optional) Update our packaging logic to only include relevant files, e.g. remove .gitignore, Makefile, and other files that are not directly necessary.
  • Add a section to the user guide about compiling from source. This can be added to the installation section. This should not include Makefile examples, but directly showcase maturin build commands.
  • Update the README section to point to the user guide. We can include a single build command for compiling a release binary for convenience.

@uuip as a workaround, you can run maturin build --release from the py-polars folder to create a release build.

stinodego avatar Apr 23 '24 07:04 stinodego

Thanks for your suggestion. I compiled it successfully using maturin directly.

uuip avatar Apr 23 '24 10:04 uuip