Skip to content

update recipe#12

Merged
scopatz merged 6 commits intoconda-forge:masterfrom
wolfv:update
Dec 3, 2020
Merged

update recipe#12
scopatz merged 6 commits intoconda-forge:masterfrom
wolfv:update

Conversation

@wolfv
Copy link
Copy Markdown
Member

@wolfv wolfv commented Dec 2, 2020

Checklist

  • Used a fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@conda-forge-linter
Copy link
Copy Markdown

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 (recipe) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipe:

  • License is not an SPDX identifier (or a custom LicenseRef) nor an SPDX license expression.

Documentation on acceptable licenses can be found here.

@conda-forge-linter
Copy link
Copy Markdown

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 (recipe) and found it was in an excellent condition.

@wolfv
Copy link
Copy Markdown
Member Author

wolfv commented Dec 2, 2020

@scopatz this fixes the sf_wchar_open not found issue on windows that quite a few users have been complaining here: conda-forge/libsndfile-feedstock#14

The problem is that noarch packages are only compiled on Linux, but the sf_wchar_open is only considered on Windows: https://github.com/bastibe/python-soundfile/blob/5f650bc017176424cb39ffbc544f4d80ca5179e9/soundfile_build.py#L130-L134

Would be awesome if you can merge this :) I also added myself as a maintainer.

@mgeier
Copy link
Copy Markdown
Contributor

mgeier commented Dec 2, 2020

@wolfv It's great that you found the root cause!

I don't think it's necessary to make platform-dependent packages, though.

What about just defining PYSOUNDFILE_PLATFORM=win32 during the build?

I guess this wouldn't hurt the other platforms.

UPDATE: I've just tried it on Linux, and the additional definition doesn't cause an error. In the code for opening files, the architecture is checked anyway, so sf_wchar_open() will not be called on Linux anyway.
However, the unneeded helper package _soundfile_data will be created in this case, which is not great.
Probably this can be worked around by monkey-patching sys.platform = 'win32' during installation?

Or can you just patch the offending code in soundfile_build.py?

Comment thread recipe/meta.yaml Outdated
mgeier added a commit to mgeier/python-soundfile that referenced this pull request Dec 2, 2020
@wolfv
Copy link
Copy Markdown
Member Author

wolfv commented Dec 2, 2020

@mgeier are you interested in being a co-maintainer?

@mgeier
Copy link
Copy Markdown
Contributor

mgeier commented Dec 2, 2020

@mgeier are you interested in being a co-maintainer?

No, thanks, I'm not a conda user.

But I'm interested in making the soundfile package work without hiccups for everyone.

A possible solution from the soundfile side could be: bastibe/python-soundfile#288.
But I don't know (yet) whether this works on all platforms and it wouldn't help in the short term anyway.

@conda-forge-linter
Copy link
Copy Markdown

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 (recipe) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipe:

  • noarch: python recipes are recommended to have a lower bound on the python version. This recommendation will become a requirement in the future.

@wolfv
Copy link
Copy Markdown
Member Author

wolfv commented Dec 2, 2020

@mgeier this is only so that you could press the merge button on this feedstock to release new versions of this software :) We have a bot that comes around to trigger version updates when you make them on PyPI for example.

Thanks for your suggestions, I applied them and tested locally on Linux and it seems to work fine.

Comment thread recipe/meta.yaml
{% set pypi_name = "SoundFile" %}
{% set version = "0.10.2" %}
{% set sha256 = "637f6218c867b8cae80f6989634a0813b416b3e6132480d056e6e5a89a921571" %}
{% set version = "0.10.3.post1" %}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This doesn't seem to be a released version. Why not do 0.10.3 with a patch?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's the current version on PyPI and Debian has this one as well: https://packages.debian.org/sid/python3-soundfile (0.10.3+post1-1)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OK, maybe this should go onto the rc label then? I don't usually use any post/alpha/betas on the main label?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't understand? Why not put a post release on the main channel? Isn't it the equivalent of incrementing the build number in the pypi world? If Debian puts it in the main channel, I think we should, too.
It's the most recent version and was released over a year ago. Time for cf to catch up! :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Post-releases seem to be for minor, non-code changes so itr should be fine to either pull from the upstream 0.10.3 or rename post releases to the latest main release.

I think it makes sense in general for conda-forge to have its own lifetimes for packages, and not be tied to other package managers.

So just to be clear, I think it is fine to pull the post release, but the post number can either be ignored in the version field or become the build number.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

conda officially supports .postX version strings and the convenience is that we don't need to change the PyPI url etc. and autotickbot etc. should continue to work fine: https://github.com/conda/conda/blob/7132ac7a713a6d61d5da317d98cea961af748d75/conda/models/version.py#L65-L66

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok fair.

Comment thread recipe/meta.yaml
number: 1001
script: python setup.py install --single-version-externally-managed --record record.txt
script:
- export PYSOUNDFILE_PLATFORM=win32
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is weird for non-windows platforms

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

agreed, but it's necessary so that the noarch package works on all platforms. @mgeier is fixing it upstream. bastibe/python-soundfile#288

This fixes a longstanding issue for Windows users on conda-forge.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Also I tested on Linux and everything seems to work fine.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ahh great! Maybe it would be easiest to wait for the fix and a full release then? Alternatively, this could use some heavy documentation and instructions on when to remove

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, I can add some comments. But git blame also always works, and I documented pretty clearly what's going on up there in the comments of this PR.

@wolfv
Copy link
Copy Markdown
Member Author

wolfv commented Dec 2, 2020

Thanks for the review @scopatz! :)

@wolfv
Copy link
Copy Markdown
Member Author

wolfv commented Dec 3, 2020

@scopatz I added lots of comments as to why we export the variable. I hope this is good to go as it will improve the life of cf's Windows users :)

@scopatz
Copy link
Copy Markdown
Member

scopatz commented Dec 3, 2020

Thanks @wolfv!

@pythonic2020
Copy link
Copy Markdown

After installing

pysoundfile 0.10.3.post1
libsndfile 1.0.30 build h0e60522_1

I can no longer import librosa 0.8.0. See report here.

@scopatz
Copy link
Copy Markdown
Member

scopatz commented Dec 3, 2020

Please open a new tracking issue

@pythonic2020
Copy link
Copy Markdown

Done. Here it is.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants