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

Added recipe for linecache2 #887

Merged
merged 8 commits into from
Aug 16, 2016
Merged

Added recipe for linecache2 #887

merged 8 commits into from
Aug 16, 2016

Conversation

pmlandwehr
Copy link
Contributor

@pmlandwehr pmlandwehr commented Jun 27, 2016

Pinging @rbtcollins in case he would like to be added as a maintainer to the linecache2 builder on conda-forge, a library of community-build conda packages - see, uh, my request at #886. If you aren't interested in helping maintain the build, that is entirely fine too.

@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/linecache2) and found some lint.

Here's what I've got...

For recipes/linecache2:

  • The recipe license cannot be unknown.

@pmlandwehr
Copy link
Contributor Author

So, as per the linter, I'm not sure what license to use here. skeleton generated the PSF license, but I couldn't find a copy anywhere...

@ocefpaf
Copy link
Member

ocefpaf commented Jun 27, 2016

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

@pmlandwehr
Copy link
Contributor Author

pmlandwehr commented Jun 27, 2016

See Issue #2 for why this build is failing. Looking at patches...

@rbtcollins
Copy link

No thanks, I'm not a conda user.

@pmlandwehr pmlandwehr changed the title Added recipe for linecache2 WIP: Added recipe for linecache2 Jul 7, 2016
@pmlandwehr pmlandwehr changed the title WIP: Added recipe for linecache2 Added recipe for linecache2 Jul 12, 2016
@pmlandwehr
Copy link
Contributor Author

@ocefpaf The log for this crash-out is really interesting - guessing it's due to the build backlog.

@ocefpaf
Copy link
Member

ocefpaf commented Jul 12, 2016

@ocefpaf The log for this crash-out is really interesting - guessing it's due to the build backlog.

Yes (and no 😄)

The the lingering recipe is just showing another bug. Can you rebase this against the latest master. (I guess there will be some other left-over recipe, but those should pass. The bob recipe was processed earlier today.)

patches:
- inspect_fodder2.patch # [not py3k]
- test_linecache.patch # [not py3k]
# inspect_fodder2 kills the build when byte-compiling on py 2.x
Copy link
Member

Choose a reason for hiding this comment

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

I believe this is one of those things that would not happen if we were using pip to install it. This is the 3rd package in conda-forge that needs this workaround... Maybe it is time to re-visit #528

Copy link
Member

Choose a reason for hiding this comment

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

Should we send these upstream or at least raise an issue? Would be great if they make some adjustments for these issues.

@ocefpaf
Copy link
Member

ocefpaf commented Jul 13, 2016

  File "/opt/conda/envs/_build/lib/python2.7/site-packages/linecache2/tests/inspect_fodder2.py", line 102
    def keyworded(*arg1, arg2=1):
                            ^
SyntaxError: invalid syntax

I am wrong! Thanks for trying @pmlandwehr and sorry for the trouble.

@ocefpaf
Copy link
Member

ocefpaf commented Jul 13, 2016

@pmlandwehr BTW, the reference that a pip install would work is this: pexpect/pexpect#290

+
+
+class BadUnicode(GetLineTestsBadData, unittest.TestCase):
+ file_byte_string = b'\x80abc'
Copy link
Member

Choose a reason for hiding this comment

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

Are we adding new tests for them? Thoughts on this @pelson?

Copy link
Member

Choose a reason for hiding this comment

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

What about this stuff though, @pmlandwehr? Looks like an addition to me. 😕

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, whoops. Yeah - that's taken from the patch mentioned in this comment That patch was applied to a different commit than the current one in the base repo, so I ported those changes into a new file. That could hasn't been thoroughly reviewed; rather, I was trusting that the various adaptations were indeed necessary for providing tests missing from the original. The fact that the original patches weren't sufficient surprised me, and resulted in the commenting spree in test_linecache.py

So: before passing this on to upstream we should establish that everything in theinspect_fodder.py patch is still essential to the build.

Copy link
Member

Choose a reason for hiding this comment

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

Seems we forgot to delete the patch after we stopped using it. Proposing removal in PR ( conda-forge/linecache2-feedstock#2 ).

@anguslees
Copy link

anguslees commented Jul 22, 2016

The patch discussions are split across multiple lines of the change, so I'll just pull the high level discussion back up to here. What is our intention with the inspect_fodder2.py fix?

  1. We can try to stick as close to what upstream did in http://bugs.python.org/issue24054, which is to apply the test_linecache.py patch we have here and delete inspect_fodder2.py altogether (upstream did this in a separate commit, but we can do it in the same patch)
  2. We can try for the minimal patch to address the issue, which means something like commenting out those few lines of inspect_fodder2.py (as is done currently here), and try for a much more minimal patch to test_linecache.py.
  3. We can try something completely different that avoids trying to byte compile inspect_fodder2.py on py2. This may be as simple as renaming the file extension (and modifying the corresponding two lines in test_linecache.py).

I feel like all of these are suggested at some point in the above discussion ;) My personal preference is for (1) sticking to upstream, as indeed I did in my own version of this recipe.

Note that none of the above discussion changes the user-visible API of the module at all. It's purely avoiding a byte-compile issue on py2 with a test data file that happened to end in .py, and never actually needed to be byte compiled (or python!).

@ocefpaf
Copy link
Member

ocefpaf commented Jul 30, 2016

@pmlandwehr is this good to go?

@ocefpaf
Copy link
Member

ocefpaf commented Jul 30, 2016

@pmlandwehr and @anguslees you may not need the patch with latest conda-build. See conda/conda-build#1146 (comment)

@msarahan as soon as we have a release we can test that here.

@jakirkham
Copy link
Member

So conda-build version 1.21.11 is out. We could try taking these patches out and see if things just work. 🍀

@pmlandwehr
Copy link
Contributor Author

Here's hoping...

@pmlandwehr
Copy link
Contributor Author

Yep! All fixed, hooray.

@pmlandwehr
Copy link
Contributor Author

Appveyor crash seems like a fluke. Closing and restarting...

@pmlandwehr pmlandwehr closed this Aug 16, 2016
@pmlandwehr pmlandwehr reopened this Aug 16, 2016
@pmlandwehr
Copy link
Contributor Author

Pinging @ocefpaf for commit.

@ocefpaf ocefpaf merged commit 0a9c70b into conda-forge:master Aug 16, 2016
@pmlandwehr pmlandwehr deleted the linecache2 branch August 17, 2016 00:46
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.

7 participants