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

[BUG] Deprecation warning legacy setup.py install method #264

Closed
rvandernoort opened this issue Jun 15, 2023 · 6 comments
Closed

[BUG] Deprecation warning legacy setup.py install method #264

rvandernoort opened this issue Jun 15, 2023 · 6 comments

Comments

@rvandernoort
Copy link

Hello I just installed this library and I get the following deprecation warning:

$ pip install emoji
...
Installing collected packages: emoji
  DEPRECATION: emoji is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for emoji ... done
Successfully installed emoji-2.5.0

I think a minimal pyproject.toml setup should suffice to remove this warning.

@cvzi
Copy link
Contributor

cvzi commented Jun 15, 2023

I think this will be solved by #258 which will publish a wheel .whl-file. Then pip can use the .whl-file instead of trying to build one first.

I'll look into a minimal pyproject.toml

@cvzi
Copy link
Contributor

cvzi commented Jun 15, 2023

I can't reproduce the error on my machine. Could you check if such a pyproject.toml helps:

[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"

I think you can clone the repo, add the pyproject.toml and then do

python -m pip install .

to test an install from current directory

@rvandernoort
Copy link
Author

rvandernoort commented Jun 19, 2023

Yes that seems to get the warning removed and I think #258 would need to have this pyproject.toml included as well. my pip=23.0.1

(venv-1) python -m pip install .                
Processing /home/rover/tmp/emoji
  Preparing metadata (setup.py) ... done
Installing collected packages: emoji
  DEPRECATION: emoji is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for emoji ... done
Successfully installed emoji-2.5.1
   
# with pyproject.toml
(venv-2)  python -m pip install .
Processing /home/rover/tmp/emoji
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: emoji
  Building wheel for emoji (pyproject.toml) ... done
  Created wheel for emoji: filename=emoji-2.5.1-py2.py3-none-any.whl size=351210 sha256=e875f66a526f369e0526ca08dd0547ee8166c673a00bc0c4e8436bb5d18874e5
  Stored in directory: /tmp/pip-ephem-wheel-cache-m6qj_1gv/wheels/27/9e/5c/d3751bb743122e49e1381411da12090d9bdbb38e917332b0bb
Successfully built emoji
Installing collected packages: emoji
Successfully installed emoji-2.5.1

cvzi added a commit to cvzi/emoji that referenced this issue Jun 21, 2023
This allows pip to generate a wheel-file when installing from source/tarballs.
Resolves carpedm20#264
@cvzi
Copy link
Contributor

cvzi commented Aug 17, 2023

If you have the time, could you check if it is really fixed with the newest version 2.8.0?

pip install emoji==2.8.0

@rvandernoort
Copy link
Author

Seem like its fixed indeed!

pip install emoji==2.8.0
Collecting emoji==2.8.0
  Downloading emoji-2.8.0-py2.py3-none-any.whl (358 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 358.9/358.9 kB 2.6 MB/s eta 0:00:00
Installing collected packages: emoji
Successfully installed emoji-2.8.0

@cvzi
Copy link
Contributor

cvzi commented Aug 24, 2023

Thanks!

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