question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] console_scripts entry_points are not extracted

See original GitHub issue

Describe the bug A clear and concise description of what the bug is.

console_scripts entry_points cannot be extracted when not formatted as a dictionary.

The format which fails:

entry_points="""
    [console_scripts]
    awslimitchecker = awslimitchecker.runner:console_entry_point
    """

To Reproduce Steps to reproduce the behavior:

  1. Create a recipe for a formula that has entry_points formatted as above.
  2. entry_points is not extracted

Expected behavior A clear and concise description of what you expected to happen.

The build section should have an entry_points section:

build:
  entry_points:
  - awslimitchecker = awslimitchecker.runner:console_entry_point

Outputs If applicable, add the output to help explain your problem.

Current output:

{% set name = "awslimitchecker" %}
{% set version = "10.0.0" %}


package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/awslimitchecker-{{ version }}.tar.gz
  sha256: 7610ac0fbe0817754e238099053a4ff4d3ea5260676094af86331891d6934a09

build:
  number: 0
  noarch: python
  script: {{ PYTHON }} -m pip install . -vv

requirements:
  host:
    - pip
    - python
  run:
    - boto3 >=1.9.175
    - botocore
    - python
    - python-dateutil
    - pytz
    - termcolor >=1.1.0
    - urllib3
    - versionfinder >=0.1.1

test:
  imports:
    - awslimitchecker
    - awslimitchecker.alerts
  commands:
    - pip check
  requires:
    - pip

about:
  home: https://github.com/jantman/awslimitchecker
  summary: A script and python module to check your AWS service limits and usage, and warn when usage approaches limits.
  license: AGPL-3.0
  license_file: LICENSE

extra:
  recipe-maintainers:
    - ADD_YOUR_GITHUB_ID_HERE

Environment: Not dependent on environment

Additional context Add any other context about the problem here.

This has been verified with two packages: https://github.com/conda-forge/staged-recipes/pull/13849 (Original entry_points) and https://github.com/conda-forge/staged-recipes/pull/13848 (Original entry_points)

Can also be reproduced by entering awslimitchecker into https://www.marcelotrevisani.com/grayskull

cc @ocefpaf and @lsetiawan

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
BastianZimcommented, Feb 22, 2021

Of course, will do!

0reactions
BastianZimcommented, Feb 22, 2021

Happy to help 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Entry point 'console_scripts' not found - Stack Overflow
Now my site-packages folder contains the relevant command_line.py, and the console entry point works as expected. Share.
Read more >
console_scripts are not created or removed on subsequent ...
If a user had previously installed a package that had no console_scripts entrypoints, then installs the package again without uninstalling it ...
Read more >
Demystefying Setuptools Entry Points - YouTube
With just a few lines of code in your `setup.py` file, you can install command -line applications, inject features into other libraries, ...
Read more >
Command Line Scripts — Python Packaging Tutorial
The console_scripts Entry Point​​ This allows Python functions (not scripts!) to be directly registered as command-line accessible tools. In this case, we'll add ......
Read more >
MiniCssExtractPlugin - webpack
It's recommended to combine mini-css-extract-plugin with the css-loader ... This option determines the name of non-entry chunk files. Works like output.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found