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

Lensfunpy #10199

Merged
merged 18 commits into from
Nov 20, 2019
Merged

Lensfunpy #10199

merged 18 commits into from
Nov 20, 2019

Conversation

mwilson8
Copy link
Contributor

Checklist

  • 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.
  • 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

@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/lensfunpy) and found it was in an excellent condition.

@mwilson8
Copy link
Contributor Author

mwilson8 commented Nov 18, 2019

Getting the error

conda.exceptions.ResolvePackageNotFound: 
  - lensfun==0.3.95=0

@conda-forge/help-c-cpp @conda-forge/help-python-c @conda-forge/staged-recipes I'm not sure the cause for the error, as lensfun is listed as a dependency and is currently in the forge, so I'm unsure of which team to ask

The extra "=0" on the end of the version is what's got me stuck ATM

@beckermr
Copy link
Member

Frack. This is my fault. The run export in the lensfun package is wrong. I don't get why, but my guess is that the hash depends on the run_export contents which needs the package hash. I will make a PR on the upstream repo to fix. Sit tight!

@beckermr
Copy link
Member

Mmmmk. Merge this one when it passes and try again.

conda-forge/lensfun-feedstock#1

@beckermr
Copy link
Member

OK. Wait about 2 hours and then retry this build. It takes a little while for new packages to hit the index.

@beckermr beckermr closed this Nov 19, 2019
@beckermr beckermr reopened this Nov 19, 2019
@beckermr
Copy link
Member

I will look into this further tonight.

@beckermr
Copy link
Member

These build errors are not due to the lensfun package missing a run export. It looks like something else. There is a git submodule that is being pulled but failing and a compilation issue as well. Check out the logs https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=95521&view=logs

@mbargull
Copy link
Member

lensfunpy/_lensfun.c:8158:16: error: too few arguments to function 'lf_lens_interpolate_vignetting'

https://github.com/letmaik/lensfunpy/blob/v1.6.1/lensfunpy/_lensfun.pyx#L164
https://github.com/lensfun/lensfun/blob/v0.3.95/include/lensfun/lensfun.h.in#L1624
lensfun/lensfun@f432766

Breaking changes:

* C interface: all lf_lens_interpolate_...() functions now require an additional crop parameter

=> lensfunpy needs to be updated for the newer lensfun version. (or lensfun<0.3.95 would need to be packaged)

@mwilson8
Copy link
Contributor Author

mwilson8 commented Nov 19, 2019

@mbargull @beckermr per the issue from the author here

It doesn't seem like lensfunpy will be updated; will work on getting lensfun<0.3.95 made

@oblute
Copy link
Contributor

oblute commented Nov 19, 2019

@mbargull @beckermr i'm going to try packaging lensfun v0.3.2 to remedy this issue because as @mwilson8 referenced looks like lensfunpy may not be updated for awhile

@beckermr
Copy link
Member

Sounds good. You can make a pr against the existing feedstock.

@mwilson8
Copy link
Contributor Author

@mbargull @beckermr there seems to be a problem in the setup.py on mac, where it's (I'm guessing) trying to rebuild lensfun from scratch??... I'm a little out of my depth on what we could modify in order to have it use conda's dependency management
build

@mbargull
Copy link
Member

We could patch https://github.com/letmaik/lensfunpy/blob/v1.6.1/setup.py#L222
like so:

-needsCompile = any(s in cmdline for s in ['install', 'bdist', 'build_ext', 'nosetests'])
+needsCompile = False

maybe?

@beckermr
Copy link
Member

I was in the middle of suggesting a patch when @mbargull beat me to it. Yes this is the right way to go.

@beckermr
Copy link
Member

@mwilson8
Copy link
Contributor Author

@beckermr we're confused why this only fails on osx.. could you take a look when you get a chance

@mwilson8
Copy link
Contributor Author

Patch the setup.py

This patch seems like it is a little out of my depth.. how much are we needing to change? Could we just remove the win/osx if statement & let all cases use use_pkg_config()?

@beckermr
Copy link
Member

Probably easiest to just set the value correctly in the if statement as opposed to trying to use pkg_config which may not work. Something like os.path.join(or.environ['PREFIX'], 'include', 'lensfun') is the right value for the include path.

@isuruf
Copy link
Member

isuruf commented Nov 19, 2019

It's good to just remove that condition for osx and let it use pkg-config

@isuruf
Copy link
Member

isuruf commented Nov 19, 2019

You also need to add pkg-config to build requirements.

@beckermr
Copy link
Member

Ahhh ok. I'm gonna let @isuruf take over here! ;p

@mwilson8
Copy link
Contributor Author

@isuruf there's a function called use_pkg_config() but you're saying we can use the conda-package pkg-config?

@isuruf
Copy link
Member

isuruf commented Nov 19, 2019

@isuruf there's a function called use_pkg_config() but you're saying we can use the conda-package pkg-config?

No, what I'm saying is for use_pkg_config() python function to work an executable called pkg-config needs to exist. (See https://github.com/letmaik/lensfunpy/blob/master/setup.py#L35-L38) This executable is in pkg-config conda package.

@mwilson8
Copy link
Contributor Author

@isuruf please review

build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- lensfun <0.3.95
Copy link
Member

Choose a reason for hiding this comment

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

This should only be in host

- python
- cython
- nose
- wheel >=0.25
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need wheel at runtime?

- nose
- wheel >=0.25
- sphinx
- sphinx_rtd_theme
Copy link
Member

Choose a reason for hiding this comment

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

sphinx is for docs which is not needed at runtime

run:
- python
- cython
- nose
Copy link
Member

Choose a reason for hiding this comment

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

This is needed only for testing. No need at runtime.

- pip
- python
- lensfun <0.3.95
- numpy
Copy link
Member

Choose a reason for hiding this comment

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

@mwilson8
Copy link
Contributor Author

@isuruf please re-review changes

- numpy
- sphinx
- wheel >=0.25
- enum34 # [py<34]
Copy link
Member

Choose a reason for hiding this comment

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

Do you need the 3 packages above?

Copy link
Contributor Author

@mwilson8 mwilson8 Nov 20, 2019

Choose a reason for hiding this comment

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

They were listed in a dev-requirements.txt file so we weren't sure

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

That's needed at runtime, so no need for it to be in host. Only run is enough

- python
- cython
- scipy
- lensfun <0.3.95
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- lensfun <0.3.95
- lensfun <0.3.95
- {{ pin_compatible("lensfun") }}

@mwilson8
Copy link
Contributor Author

@isuruf ready for review

Comment on lines 37 to 35
- lensfun <0.3.95
- {{ pin_compatible('lensfun') }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@isuruf should I have left lensfun <0.3.95 in there as well as the pin compatible dep? Or is it okay to replace like this

Copy link
Member

Choose a reason for hiding this comment

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

Both are needed IMO.

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copy link
Member

Choose a reason for hiding this comment

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

Can you open an issue upstream about including the license in the sdist?

@isuruf isuruf changed the title [weird error] Lensfunpy Lensfunpy Nov 20, 2019
@isuruf isuruf merged commit fe3d978 into conda-forge:master Nov 20, 2019
@mwilson8
Copy link
Contributor Author

letmaik/lensfunpy#23
But with the author not having commited, commented in over a year the chances are likely low

@mwilson8 mwilson8 deleted the lensfunpy branch November 20, 2019 20:34
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.

6 participants