Skip to content

Conversation

@benoit-pierre
Copy link
Member

The integration tests can now be run on Windows.

I added Python 3.6 jobs to AppVeyor, however, while I tested with all variants (x86/amd64, 2.7/3.3/3.4/3.5/3.6), this PR only enable the integration tests for the Python27 and Python36-x64 jobs; as with only one job active at a time, enabling integration tests for all jobs will result in a ~3 hours long CI run...

Fix one bug: InstallRequirement.get_dist() would not correctly detect the distribution name (see b327c77).

@pradyunsg pradyunsg added type: maintenance Related to Development and Maintenance Processes OS: windows Windows specific C: tests Testing and related things labels Oct 5, 2017
@pradyunsg
Copy link
Member

Yayie! Thanks for working on this @benoit-pierre! ^>^

as with only one job active at a time

Can we have multiple jobs run concurrently? I don't know if it's possible but if it is, it'd be nice.

Fix one bug

Which is why we kinda need these tests to be run on Windows. :P

@benoit-pierre
Copy link
Member Author

@pradyunsg
Copy link
Member

insert sad reaction here

@pfmoore
Copy link
Member

pfmoore commented Oct 5, 2017

Yeah, many thanks for this. I'm not sure how easy it's going to be to review this, there's a lot of complexity in here. I'll try to go through it, but as a general comment I will say that the fact that the CI runs are succeeding is a reasonable indication that things look good overall.

I agree with your decision to just run 2.7 and 3.6 x64. The intent here should be to catch Windows-specific issues, not completely re-test everything Travis already covers, so that should be sufficient.

Copy link
Member

@pradyunsg pradyunsg left a comment

Choose a reason for hiding this comment

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

I gave this a pass and it looks mostly good to me.


# Compute relative install path to FSPkg from scratch path.
full_rel_path = data.packages.join('FSPkg') - script.scratch_path
full_rel_url = ('file:' + full_rel_path +
Copy link
Member

Choose a reason for hiding this comment

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

nit: I would wrap it like:

    full_rel_url = (
        'file:' + full_rel_path + '#egg=FSPkg'
    ).replace(os.path.sep, '/')

rel_prefix_path = script.scratch / 'prefix'
install_path = (
path / 'site-packages' / 'simple-1.0-py{0}.egg-info'.format(pyversion)
distutils.sysconfig.get_python_lib(prefix=rel_prefix_path) /
Copy link
Member

Choose a reason for hiding this comment

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

Not sure how good an idea it is to be depending on/using distutils here and in a few other places; is there some equivalent function in pip's codebase?

Copy link
Member Author

Choose a reason for hiding this comment

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

We already use it in other places, and in pip's codebase. I don't see an equivalent function we could use.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for looking! I now think my question was not exactly specific to this PR anyway.

'requiresupper' has install_requires = ['upper']
"""
Upper = os.path.join(data.find_links, 'Upper-1.0.tar.gz')
Upper = '/'.join((data.find_links, 'Upper-1.0.tar.gz'))
Copy link
Member

Choose a reason for hiding this comment

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

Why not os.path.join?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because data.find_links is an URL.

Copy link
Member

Choose a reason for hiding this comment

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

Oh. Okay. XD

Copy link
Member

Choose a reason for hiding this comment

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

Maybe better to use urljoin then, just to be explicit? I wouldn't want someone in future to "helpfully" switch back to os.path.join (although the Windows tests would now pick that up 😄)

Copy link
Member Author

Choose a reason for hiding this comment

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

Except just replacing the example above with urljoin(data.find_links, 'Upper-1.0.tar.gz') does not work... Because:

>>> urljoin('/index/', 'package.tar.gz')
'/index/package.tar.gz'
>>> urljoin('/index', 'package.tar.gz
'/package.tar.gz'

Alternatively, use from posixpath import join as urljoin?

@pradyunsg
Copy link
Member

@benoit-pierre It would be awesome if you could split out the lsat 2 commits into 2 separate PRs.

They're not really specific to Windows in any way but it'd be nice to handle them independently.

@pradyunsg
Copy link
Member

@benoit-pierre Could you add a news file for this? :)

IMO it should be a .feature because it's a major change on the development/maintenance side for pip.

@dstufft
Copy link
Member

dstufft commented Oct 6, 2017

Honestly, it probably doesn't need to be mentioned in the change log at all. I don't think users will care that we started running integration tests on Windows (and "how much do users care about X" is sort of the standard to judge if something needs to be in the change log or not).

@pradyunsg
Copy link
Member

I added one to #4545 on @pfmoore's suggestion. ._.

@dstufft
Copy link
Member

dstufft commented Oct 6, 2017

Lol, well either way is fine :) I personally wouldn't have.

@pfmoore
Copy link
Member

pfmoore commented Oct 6, 2017

Ha. My "think of an answer on the spur of the moment" approach has been exposed 😉. I actually like @dstufft's principle of "do users care" here, so I'll reverse myself from before and say I'm OK with not having a news item here.

@pfmoore pfmoore added the skip news Does not need a NEWS file entry (eg: trivial changes) label Oct 6, 2017
.travis/run.sh Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Why the change to use --develop here? I don't have a particular problem with it, just don't understand why it's needed (and whether that implies there's an implication of one of the other changes that I've missed).

Copy link
Member Author

Choose a reason for hiding this comment

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

It's just faster, and we don't need to do a normal installation anymore (since we don't run unvendored tests).

Copy link
Member

Choose a reason for hiding this comment

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

OK, cool, so not specifically related to the Windows changes. That's fine (and faster is always good ;-)).

@pfmoore
Copy link
Member

pfmoore commented Oct 6, 2017

Added a couple of minor points, but overall LGTM

@pradyunsg
Copy link
Member

I'm OK with not having a news item here.

Then I am too. :)

@pradyunsg
Copy link
Member

@pfmoore So, is this good to go? :3

@pradyunsg pradyunsg mentioned this pull request Oct 6, 2017
@benoit-pierre
Copy link
Member Author

I moved the last 2 commits to their own PRs, as asked by @pradyunsg.

@pradyunsg
Copy link
Member

Thank you! ^>^

Once the CI allows, I'll merge them. :)

@pfmoore
Copy link
Member

pfmoore commented Oct 6, 2017

@pradyunsg Yep, I'm happy for this to be merged.

@pfmoore pfmoore merged commit 961737a into pypa:master Oct 6, 2017
@pfmoore
Copy link
Member

pfmoore commented Oct 6, 2017

Thanks @benoit-pierre for doing this - it's a huge improvement to our testing on Windows!

@benoit-pierre benoit-pierre deleted the win_tests branch October 6, 2017 19:52
@pradyunsg
Copy link
Member

Linking to #4751.

@lock
Copy link

lock bot commented Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

auto-locked Outdated issues that have been locked by automation C: tests Testing and related things OS: windows Windows specific skip news Does not need a NEWS file entry (eg: trivial changes) type: maintenance Related to Development and Maintenance Processes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants