keras icon indicating copy to clipboard operation
keras copied to clipboard

2.10.0: not ready for pep517 build spec?

Open kloczek opened this issue 3 years ago • 8 comments
trafficstars

Looks like keras is not ready for pep157 build procedure.

+ /usr/bin/python3 -sBm build -w --no-isolation
ERROR Source /home/tkloczko/rpmbuild/BUILD/keras-2.10.0 does not appear to be a Python project: no pyproject.toml or setup.py

🤔

kloczek avatar Sep 04 '22 00:09 kloczek

@kloczek, Could you please provide the build source you are trying to install. Also please try to install the latest stable v2.9.0 from here and let us know if you are facing the same issue. Thank you!

tilakrayal avatar Sep 05 '22 07:09 tilakrayal

@kloczek, Could you please provide the build source you are trying to install. Also please try to install the latest stable v2.9.0 from here and let us know if you are facing the same issue. Thank you!

I'm usimg source tar ball autogenerated from git tag. https://github.com/keras-team/keras/archive/refs/tags/v2.10.0.tar.gz

kloczek avatar Sep 05 '22 07:09 kloczek

Here is result with v2.9.0

+ /usr/bin/python3 -sBm build -w --no-isolation
ERROR Source /home/tkloczko/rpmbuild/BUILD/keras-2.9.0 does not appear to be a Python project: no pyproject.toml or setup.py

kloczek avatar Sep 05 '22 07:09 kloczek

BTW on https://pypi.org/project/keras/ latest version is 2.10.0.

kloczek avatar Sep 05 '22 07:09 kloczek

@qlzh727

ianstenbit avatar Sep 15 '22 17:09 ianstenbit

Hi @kloczek,

TensorFlow and Keras both use their own build process, which does not follow the 517/setup.py paradigm. It may not be feasible to add support for Pep517 due to the inclusion of a Bazel BUILD rule, which is a reserved keyword in 517.

(As an example error when trying to build with a setup.py: error: could not create 'build': File exists.)

Is there some use case that you're unable to achieve due to this?

ianstenbit avatar Sep 15 '22 22:09 ianstenbit

(As an example error when trying to build with a setup.py: error: could not create 'build': File exists.)

pep517 has nothing to do with setup.py or setuptools genrally. setuptools and setup.py may be used but it is not needed/is not essential. If you want you want you may use any other pep17 backend like poetry, hatch, whey, flit, bento and many other (and setuptools as well)

PEPs are documents with some standards of fetures and processes which python modules should fillow. https://peps.python.org/pep-0517/ I don't think that it is any PEP ducument about Bazel.

kloczek avatar Sep 16 '22 00:09 kloczek

Thanks for following up -- I recognize what PEP517 is, and we use setuptools to support it on other packages. However, given that Keras and TF use a separate build process, I'm not sure I understand what the problem is with not adopting pep517.

Can you please clarify what use case is prevented by this?

ianstenbit avatar Sep 16 '22 00:09 ianstenbit