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

Adding dimcli from PyPI #17275

Merged
merged 20 commits into from
Dec 18, 2021
Merged

Adding dimcli from PyPI #17275

merged 20 commits into from
Dec 18, 2021

Conversation

sugatoray
Copy link
Contributor

@sugatoray sugatoray commented Dec 16, 2021

Checklist

  • Title of this PR is meaningful: e.g. "Adding my_nifty_package", not "updated meta.yaml".
  • License file is packaged (see here for an example).
  • Source is from official source.
  • Package does not vendor other packages. (If a package uses the source of another package, they should be separate packages or the licenses of all packages need to be packaged).
  • If static libraries are linked in, the license of the static library is packaged. NA
  • Build number is 0.
  • A tarball (url) rather than a repo (e.g. git_url) is used in your recipe (see here for more details).
  • GitHub users listed in the maintainer section have posted a comment confirming they are willing to be listed there.
  • When in trouble, please check our knowledge base documentation before pinging a team.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/dimcli) and found it was in an excellent condition.

- temporary hack: requirements.txt is missing in PyPI tar.gz
- copy requires.txt and create requirements.txt
- for copying "requirements.txt" from "dimcli.egg-info/requires.txt"
- copy only-if "requirements.txt" is not present already
@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/dimcli) and found some lint.

Here's what I've got...

For recipes/dimcli:

  • Failed to even lint the recipe, probably because of a conda-smithy bug 😢. This likely indicates a problem in your meta.yaml, though. To get a traceback to help figure out what's going on, install conda-smithy and run conda smithy recipe-lint . from the recipe directory.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/dimcli) and found it was in an excellent condition.

@sugatoray
Copy link
Contributor Author

sugatoray commented Dec 16, 2021

Note

The PyPI package of dimcli does not have requirements.txt, which is why as a workaround, I am currently copying it from dimcli.egg-info/requires.txt. The PR (digital-science/dimcli#76) for this issue (digital-science/dimcli#75) should fix that. Once it is fixed, remove the extra commands other than {{ PYTHON }} -m pip install . -vv

Copying the requirements.txt file

script:
    {% set reqfile = "requirements.txt" %}
    {% set reqsource = "dimcli.egg-info/requires.txt" %}
    # IF {{ reqfile }} is NOT PRESENT, COPY {{ reqfile }} from {{ reqsource }}
    - if [ ! -f {{ reqfile }} ] && [ -f {{ reqsource }} ]; then cp {{ reqsource }} {{ reqfile }}; fi  # [not win]
    ## - echo "IF NOT EXIST {{ reqfile }} ( IF EXIST {{ reqsource }} COPY {{ reqsource }} {{ reqfile }} ) )" | cmd.exe  # [win]
    ## - IF (-NOT(TEST-PATH -PATH {{ reqfile }})) { IF (TEST-PATH -PATH {{ reqsource }}) { COPY {{ reqsource }} {{ reqfile }} } }  # [win]
    - COPY {{ reqsource }} {{ reqfile }}  # [win]
    - {{ PYTHON }} -m pip install . -vv

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/dimcli) and found some lint.

Here's what I've got...

For recipes/dimcli:

  • Failed to even lint the recipe, probably because of a conda-smithy bug 😢. This likely indicates a problem in your meta.yaml, though. To get a traceback to help figure out what's going on, install conda-smithy and run conda smithy recipe-lint . from the recipe directory.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/dimcli) and found it was in an excellent condition.

@sugatoray
Copy link
Contributor Author

sugatoray commented Dec 16, 2021

Request for review.

cc: @conda-forge/help-python @dopplershift

- to avoid error (win build)
Comment on lines +20 to +25
{% set reqfile = "requirements.txt" %}
{% set reqsource = "dimcli.egg-info/requires.txt" %}
# IF {{ reqfile }} is NOT PRESENT, COPY {{ reqfile }} from {{ reqsource }}
- if [ ! -f {{ reqfile }} ] && [ -f {{ reqsource }} ]; then cp {{ reqsource }} {{ reqfile }}; fi # [not win]
- copy dimcli.egg-info\requires.txt {{ reqfile }} # [win]
- {{ PYTHON }} -m pip install . -vv
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kudos for this bit of magic!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hehe! Not quite!

If you see carefully, I was not able to apply the "IF" conditionals for windows. Any help/suggestion on what I should have done?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows has its own syntax that I usually find by looking through other recipes. IDK If you tried that. I don't see the problem with always copying requires though.

@beckermr beckermr merged commit 907d7e1 into conda-forge:main Dec 18, 2021
@sugatoray
Copy link
Contributor Author

Thank you, for the lightning fast merge! ⚡ @beckermr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants