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

[BUG] Noarch is not found #412

Closed
BastianZim opened this issue Oct 30, 2022 · 7 comments · Fixed by #496
Closed

[BUG] Noarch is not found #412

BastianZim opened this issue Oct 30, 2022 · 7 comments · Fixed by #496
Labels
bug Something isn't working

Comments

@BastianZim
Copy link
Contributor

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

The following package should be noarch but Grayskull outputs it as arch: https://pypi.org/project/desert/#description

To Reproduce
Steps to reproduce the behavior:

  1. grayskull pypi --strict-conda-forge desert

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

Package is created as noarch

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

Environment:

  • conda list
  • pip list
  • grayskull --version

Version: 1.8.4

Additional context
Add any other context about the problem here.

Could it be because of the dataclasses?

The GitHub repo doesn't have the release which is why I linked the PyPI page.

@BastianZim BastianZim added the bug Something isn't working label Oct 30, 2022
@BastianZim
Copy link
Contributor Author

Most probably a duplicate of #408

@BastianZim
Copy link
Contributor Author

Have seen that also with the package certbot. It seems like Grayskull first determines if it can be noarch (It can't because it has a OS specific dependency) and then does the replacement of (In this example pywin32 to pywin32-on-windows) which allows it to become noarch.

@marcelotrevisani
Copy link
Member

Indeed, I will need to check a few things related to the noarch. Thanks for reporting it!

@marcelotrevisani
Copy link
Member

ok, got it
it didn't add the noarch: python because if you generate the package without --strict-conda-forge it is going to generate dataclasses # [py<37]"

@marcelotrevisani marcelotrevisani linked a pull request Sep 21, 2023 that will close this issue
@marcelotrevisani
Copy link
Member

With this PR: #496

I was able to generate the following recipe for desert:

grayskull pypi desert --strict-conda-forge
{% set name = "desert" %}
{% set version = "2022.9.22" %}

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

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

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

requirements:
  host:
    - python
    - pip
  run:
    - python
    - marshmallow >=3.0
    - attrs
    - typing_inspect
    - dataclasses

test:
  imports:
    - desert
  commands:
    - pip check
  requires:
    - pip

about:
  home: https://github.com/python-desert/desert
  summary: Deserialize to objects while staying DRY
  license: MIT
  license_file: LICENSE

extra:
  recipe-maintainers:
    - marcelotrevisani

@BastianZim
Copy link
Contributor Author

Thanks for the fix!

Both pythons don't have a version after them. Is that because of copy-paste or might that be another bug?

(I cannot test it yet because it's not available yet, I think).

@marcelotrevisani
Copy link
Member

it is a bug, I just realised that I also introduced another bug in one of the past PRs 😮‍💨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants