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.

[FEATURE] Be aware of empty packages for certain python versions

See original GitHub issue

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I’m always frustrated when […]

Some packages on conda-forge are empty for specific python versions (one example here is dataclasses) as they contain features added to later python versions. The empty packages were added since the package that depends on them could otherwise not be noarch: python. Currently, Grayskull still recommends skipping those packages for the python versions where they aren’t needed anymore, even if the packages are actually empty.

One example here is the output of transformers:

{% set name = "transformers" %}
{% set version = "4.3.3" %}


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

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/transformers-{{ version }}.tar.gz
  sha256: 48d6cc3ab40c901b9ce803d3b445ff88f023150dde7b36bf834829bca759b7fd

build:
  number: 0
  skip: true   # [py2k]
  entry_points:
    - transformers-cli=transformers.commands.transformers_cli:main
  script: {{ PYTHON }} -m pip install . -vv

requirements:
  host:
    - pip
    - python
  run:
    - dataclasses  # [py<37]
    - filelock
    - importlib-metadata  # [py<38]
    - numpy >=1.17
    - packaging
    - python
    - regex !=2019.12.17
    - requests
    - sacremoses
    - tokenizers >=0.10.1,<0.11
    - tqdm >=4.27

test:
  imports:
    - transformers
    - transformers.benchmark
  commands:
    - pip check
    - transformers-cli --help
  requires:
    - pip

about:
  home: https://github.com/huggingface/transformers
  summary: State-of-the-art Natural Language Processing for TensorFlow 2.0 and PyTorch
  license: Apache-2.0
  license_file: LICENSE

extra:
  recipe-maintainers:
    - ADD_YOUR_GITHUB_ID_HERE

Describe the solution you’d like A clear and concise description of what you want to happen.

Grayskull should be aware of empty packages and not add a skip statement, even if upstream demands it.

Describe alternatives you’ve considered A clear and concise description of any alternative solutions or features you’ve considered. None

Additional context Add any other context or screenshots about the feature request here.

It might be nice to have this in a database that is also linked in the docs. I have opened https://github.com/conda-forge/conda-forge.github.io/issues/1270 to reflect this.

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
BastianZimcommented, Apr 9, 2021

I will, but so far it’s actually only dataclasses and typing: https://conda-forge.org/docs/maintainer/knowledge_base.html#empty-python-packages

Another candidate would be typing_extensions but the maintainers are quite busy and haven’t replied to me yet and importlib_metadata which was planned but not finished yet.

Edit: Typing_extensions should be installable under all python versions but has some edge cases so it might be better to keep it off the list.

0reactions
marcelotrevisanicommented, Apr 7, 2021

You can add them on this issue, next month I will be more active in developing grayskull again. So, if you have a collection of those things please add them here and I will pick it up 😃

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to install packages that target a range of python ...
I am on the latest Poetry version. I have searched the issues of this repo and believe that this is not a duplicate....
Read more >
PEP 508 – Dependency specification for Python Software ...
Sometimes dependencies are only relevant in one platform, or only some versions are acceptable, so the language permits describing all these cases.
Read more >
Packaging Python Projects
Packaging Python Projects¶. This tutorial walks you through how to package a simple Python project. It will show you how to add the...
Read more >
6. Modules — Python 3.11.1 documentation
Modules ¶. If you quit from the Python interpreter and enter it again, the definitions you have made (functions and variables) are lost....
Read more >
warnings — Warning control — Python 3.11.1 documentation
Warning messages are typically issued in situations where it is useful to alert the user of some condition in a program, where that...
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