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

No documentation about markers (such as platform) #738

Closed
thernstig opened this issue Dec 13, 2018 · 12 comments
Closed

No documentation about markers (such as platform) #738

thernstig opened this issue Dec 13, 2018 · 12 comments
Labels
area/docs Documentation issues/improvements

Comments

@thernstig
Copy link

  • [x ] I have searched the issues of this repo and believe that this is not a duplicate.

Issue

There seems to be no mention in the documentation of the usage and supported markers, but they do seem to be supported according to #21

@nyanpasu64
Copy link

nyanpasu64 commented Dec 21, 2018

What platform do I use for Windows 10 x64?

I'm using Poetry 0.12.10.

poetry remove pywin32-ctypes
pip uninstall -y pywin32-ctypes
pyinstaller
poetry add --platform=windows pywin32-ctypes
pyinstaller

And I"ve tried windows, Windows, nt, and pywin32-ctypes never gets installed.

EDIT: poetry install creates setup.py containing:

extras_require = \
{':sys_platform == "windows"': ['pywin32-ctypes>=0.2.0,<0.3.0']}

sys.platform is "win32" so I should use sys.platform.

@carlosperate
Copy link

I was looking into this recently and cound't find the documentation either, are platform markers officially supported?

@deepio
Copy link

deepio commented Jul 2, 2019

Could this be documented please? @sdispater
#1189

@stale
Copy link

stale bot commented Nov 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 13, 2019
@thernstig
Copy link
Author

/ unstale 📦

@stale stale bot removed the stale label Nov 13, 2019
@finswimmer finswimmer added the area/docs Documentation issues/improvements label Feb 9, 2020
@eterna2
Copy link

eterna2 commented Apr 23, 2020

can I check if

extras_require = \
{':sys_platform == "windows"': ['pywin32-ctypes>=0.2.0,<0.3.0']}

is a valid setup.py format? Because I get format error (extras_require must be a dict of xyz) when I tried to do python setup.py install

@zillionare
Copy link

where can I find the documentation for specifying sys_platform. According to the thread, it's added to the document, however I can't find it in the document.

@sinoroc
Copy link

sinoroc commented Nov 12, 2020

@zillionare It's in the "Dependency specification -- Using environment markers" section.

Example:

[tool.poetry.dependencies]
pathlib2 = { version = "^2.2", markers = "python_version ~= '2.7' or sys_platform == 'win32'" }

The complete specification for environment markers is in PEP 508.

@dclong
Copy link

dclong commented Nov 12, 2020

Is it possible to restrict the whole package to be on, say, Linux only? Do I have to use marker for every package or is there a simple way of specifying OS restrictions?

@sinoroc
Copy link

sinoroc commented Nov 12, 2020

Is it possible to restrict the whole package to be on, say, Linux only? Do I have to use marker for every package or is there a simple way of specifying OS restrictions?

@dclong Use trove classifiers. They are an informal (non-enforced) restriction:

[tool.poetry]
# ...
classifiers = [
    "Operating System :: POSIX :: Linux",
]

@dclong
Copy link

dclong commented Nov 12, 2020

@sinoroc This is awesome! Thank you very much for the links! I will check them.

Copy link

github-actions bot commented Mar 2, 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 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/docs Documentation issues/improvements
Projects
None yet
Development

No branches or pull requests

10 participants