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

app-vim/jedi: Enabled tests #6103

Closed
wants to merge 1 commit into from
Closed

app-vim/jedi: Enabled tests #6103

wants to merge 1 commit into from

Conversation

TheChymera
Copy link
Contributor

@TheChymera TheChymera commented Nov 1, 2017

Ebuild improvement (not needing revbump):

  • .tar.gz is prefferable to .zip.
  • Tests actually work, so we enable them.

The tests are a bit quirky, though. They are run my the make script of the package, and if we attempt to run them again via the ebuild phase they fail all over the place (they are somehow trying to pull in deps).

Also the tests are only pthon3 compatible, but they fail not contingent on the python USE flags, but ontingent on the first python selected via eselect :-/

@monsieurp

Package-Manager: Portage-2.3.13, Repoman-2.3.3

Package-Manager: Portage-2.3.13, Repoman-2.3.3
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull Request assignment

Areas affected: ebuilds
Packages affected: app-vim/jedi

app-vim/jedi: horea.christ[at]gmail.com, @gentoo/proxy-maint, @gentoo/vim

@gentoo-repo-qa-bot gentoo-repo-qa-bot added the assigned PR successfully assigned to the package maintainer(s). label Nov 1, 2017
src_compile() { :; }
# Makefile tries hard to call tests so let's silence this phase, unless we are testing.
src_compile() {
if use test; then
Copy link
Member

Choose a reason for hiding this comment

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

If tests only work with Python 3, please make sure to check that the Python implementation the user has chosen on his system in indeed Python 3. @mgorny wrote a function to perform this check called python_is_python3. You need to add it to the if clause:

if use test && python_is_python3; then
    default;
else
    :;
fi

Also, can we move this code to the src_test phase? It would be more appropriate to run tests during this phase.

@floppym
Copy link
Contributor

floppym commented Nov 1, 2017

This ebuild isn't using python-r1.eclass properly at all. I do not see any calls to python_foreach_impl.

@floppym
Copy link
Contributor

floppym commented Nov 1, 2017

I suggest converting to python-single-r1.

@floppym
Copy link
Contributor

floppym commented Nov 1, 2017

Or, if python is only used at build time, python-any-r1 should be used.

If python is only used for tests, having python2_7 in PYTHON_COMPAT makes no sense.

@monsieurp
Copy link
Member

I'm digging further into this and it turns out test files are fetched from Github:

$ cat conftest.py
import urllib.request
...
VSPEC_URL = 'https://github.com/kana/vim-vspec/archive/1.4.1.zip'
...
def pytest_configure(config):
    if not os.path.isdir(CACHE_FOLDER):
        os.mkdir(CACHE_FOLDER)

    if not os.path.exists(VSPEC_FOLDER):
        name, hdrs = urllib.request.urlretrieve(VSPEC_URL)
...

This is clearly not OK. We've got to patch conftest.py so that it doesn't fetch the zip file and let Portage take care of this part.

@TheChymera do you want to do it?

@TheChymera
Copy link
Contributor Author

@monsieurp I currently don't have the time to further dig into this. I made the PR mainly to share the level I understood this atm and provide a reference for when I might get back to it. If you can patch this it would be really nice :)

@monsieurp
Copy link
Member

OK fine. Let me close this PR. I'm going to file a bug and link to here then.

@monsieurp monsieurp closed this Nov 1, 2017
@TheChymera TheChymera deleted the jedi branch November 2, 2017 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s).
Projects
None yet
4 participants