-
-
Notifications
You must be signed in to change notification settings - Fork 69
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] tool.flit.scripts
is not extracted as entry_points
#269
Comments
Maybe now that PEP 517 metadata is supported (and starting to be used by more than just flit) we can start looking at that as the intermediate representation? https://flit.pypa.io/en/latest/pyproject_toml.html#scripts-section [project.scripts]
flit = "flit:main" at that point, supporting a legacy "pun" for the name wouldn't be that hard. |
Yeah but we need to figure out what exactly the equivalent is because flit also has https://flit.pypa.io/en/latest/pyproject_toml.html#entry-points-sections Maybe https://flit.pypa.io/en/latest/pyproject_toml.html#scripts-section is |
I was surprised too, but I think it's a convenience: further down it says
you _can't_ have console_scripts and gui_scripts in the entry points table
|
Oh yeah – missed that. Would make the most sense then, agreed. |
You could build the wheel or otherwise generate the metadata, and parse scripts out of entry_points.txt |
Should we close this? or is it still a problem? I am a bit confused here, sorry 😄 |
I think it's still a problem. In short: Pyproject.toml flit uses This example: https://gitlab.com/yaq/yaqc-qtpy/-/blob/main/pyproject.toml#L42 is not converted into an The confusion above came because I wasn't 100% sure if pyproject.toml |
You could have it do the build and take the entry points out of dist-info. |
the only problem is that, I would prefer to avoid in creating the whole build, because grayskull just start the build and stop it after it gets all the metadata, that is for setup.py and related. For pyproject.toml I am pretty much parsing the toml file as it is faster and simple to do. |
With this PR I was able to generate the following recipe for grayskull pypi yaqc-qtpy --strict-conda-forge {% set name = "yaqc-qtpy" %}
{% set version = "2022.6.0" %}
package:
name: {{ name|lower }}
version: {{ version }}
source:
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/yaqc-qtpy-{{ version }}.tar.gz
sha256: 6a6b73fb3179882bc46a18a1de9fc6c8ced2fffb8d0f5e00ed816a8d598a4ead
build:
entry_points:
- yaqc-qtpy = yaqc_qtpy.__main__:main
noarch: python
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
number: 0
requirements:
host:
- python >=3.7
- flit-core >=2,<4
- pip
run:
- python >=3.7
- yaqd-core >=2020.06.3
- yaqc
- yaq-traits
- yaqd-control
- click
- qtpy
- qtypes >=2022.6.0
- pyqtgraph
- pyside2
- numpy
- qtconsole
test:
imports:
- yaqc_qtpy
commands:
- pip check
- yaqc-qtpy --help
requires:
- pip
about:
home: https://yaq.fyi
summary: Tooling for building simple yaq clients using qtpy.
dev_url: https://github.com/yaq-project/yaqc-qtpy
license: LGPL-3.0 AND CC0-1.0
license_file:
- LICENSE
- yaqc_qtpy/splash-images/LICENSE |
Describe the bug
A clear and concise description of what the bug is.
This is not 100% confirmed but currently the assumption is that
[tool.flit.scripts]
in a pyproject.toml file is the same asentry_points
. This is not extracted.To Reproduce
Steps to reproduce the behavior:
entry_points
are created.Expected behavior
A clear and concise description of what you expected to happen.
entry_points
are extracted correctly.Outputs
If applicable, add the output to help explain your problem.
Can be tried with
yaqc-qtpy
.Additional context
Add any other context about the problem here.
Ref about it being equal: https://gitter.im/conda-forge/conda-forge.github.io?at=6026b6e7063b6c68d55680a7
Sample package that has the new scripts: https://gitlab.com/yaq/yaqc-qtpy/-/blob/main/pyproject.toml#L33
The text was updated successfully, but these errors were encountered: