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 sys.version_info in setup.py #758

Closed
3 tasks done
timonbimon opened this issue Dec 21, 2018 · 2 comments
Closed
3 tasks done

Wrong sys.version_info in setup.py #758

timonbimon opened this issue Dec 21, 2018 · 2 comments

Comments

@timonbimon
Copy link

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Mac OS X Mojave
  • Poetry version: 0.12.10

Issue

When trying to install ray with poetry add ray the following error gets thrown:

Package operations: 6 installs, 0 updates, 0 removals

  - Installing faulthandler (3.1)

[EnvCommandError]
Command ['/Users/timon/Library/Caches/pypoetry/virtualenvs/hybrid-py3.7/bin/pip', 'install', '--no-deps', 'faulthandler==3.1'] errored with the following output:
Collecting faulthandler==3.1
  Using cached https://files.pythonhosted.org/packages/0f/22/7909e7de4f5ab4d4bfdefc46ccf360ef52db8db1539c948a6402a18d5dfc/faulthandler-3.1.tar.gz
    Complete output from command python setup.py egg_info:
    ERROR: faulthandler is a builtin module since Python 3.3

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/d4/6gfmg7bx1gj69rgx5r4_jm2h0000gn/T/pip-install-uhb7waek/faulthandler/

My project is using Python 3.7.0 and the following line can be found in the setup.py of ray:

if sys.version_info < (3, 0):
    requires.append("faulthandler")

so it seems to me that faulthandler should not have been added to the requirements. any ideas why this is happening would be greatly appreciated! :)

here's my pyproject.toml

[tool.poetry]
name = "project"
version = "0.1.0"

[tool.poetry.dependencies]
python = "^3.7"
Flask = "^1.0"
flask-bcrypt = "^0.7.1"
flask-sqlalchemy = "^2.3"
flask-marshmallow = "^0.9.0"
marshmallow-sqlalchemy = "^0.15.0"
connexion = "^2.0"
environs = "^4.0"
psycopg2 = "^2.7"
gunicorn = "^19.9"
PyJWT = "^1.7"
jsonschema = "^2.6"

[tool.poetry.dev-dependencies]
pytest = "^3.8"
pytest-flask = "^0.14.0"
"testing.postgresql" = "^1.3"

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
@sdispater
Copy link
Member

You should not use if statements to specify Python specific dependencies but rather environment markers which is the recommended way to do so.

Copy link

github-actions bot commented Mar 3, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants