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

Vs2008 appveyor cmake #1678

Merged
merged 33 commits into from
Oct 10, 2016
Merged

Vs2008 appveyor cmake #1678

merged 33 commits into from
Oct 10, 2016

Conversation

shadowwalkersb
Copy link
Contributor

@shadowwalkersb shadowwalkersb commented Sep 28, 2016

Closes #617
Closes #1737

There isn't much I changed, but this is based on PR ( #617 ).

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

Here's what I've got...

For recipes/vs2008_express_vc_python_patch:

  • The home item is expected in the about section.
  • The license item is expected in the about section.

version: 1.0

source:
url: https://github.com/conda-forge/conda-forge-build-setup-feedstock/raw/master/vs2008_patch.zip
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This, obviously, needs to be added to conda-forge-build-setup-feedstock if approved.

Copy link
Member

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.

Though we talked about this before and I think we are ok extracting and including that stuff here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I upload it to conda-forge-build-setup-feedstock via a PR?

Copy link
Member

Choose a reason for hiding this comment

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

Also please see these, which are basically the same.

xref: #251
xref: conda-forge/conda-smithy#107

Copy link
Member

Choose a reason for hiding this comment

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

Should I upload it to conda-forge-build-setup-feedstock via a PR?

Nope. We should decompress it and include its source in this recipe.

@shadowwalkersb
Copy link
Contributor Author

I am not sure how to address this, #617 (comment).

- TARGET_ARCH: "x64"
CONDA_PY: "35"
PY_CONDITION: "python >=3.5"
CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64"
Copy link
Member

Choose a reason for hiding this comment

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

So this stuff shouldn't be changed right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wasn't sure. Reverting.

Copy link
Member

Choose a reason for hiding this comment

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

Done.

@jakirkham
Copy link
Member

I am not sure how to address this, #617 (comment).

I think this will get a lot easier once we include the source in the recipe. Then we can tweak the script and the like.

@jakirkham
Copy link
Member

cc @patricksnape

@@ -72,6 +72,9 @@ install:
# Remove cygwin (and therefore the git that comes with it).
- cmd: rmdir C:\cygwin /s /q

# Install workaround 64-bit support for VS 2008.
- cmd: if "%TARGET_ARCH%" == "x64" if "%CONDA_PY%" == "27" call vs2008\setup_x64.bat
Copy link
Member

Choose a reason for hiding this comment

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

Please remove this. The point of this package is it will take its place ultimately.

shadowwalkersb and others added 4 commits September 28, 2016 09:00
* Include the `x64` directory of reg files from staged-recipes history.
* Include `setup_x64.bat` script from staged-recipes history.
* Remove `post-link.bat` and incorporate relevant pieces.
* Update `meta.yaml` to handle current installation structure.
* Drop `bld.bat` as the script is included in `meta.yaml` to be compact.
* Revert changes made to `appveyor.yml` as they are not needed.
@jakirkham
Copy link
Member

Please see PR ( https://github.com/shadowwalkersb/staged-recipes/pull/1 ). This may help get this on the right track. May still need some more fixes, but we can find out after it is merged.

Restructure vs2008_express_vc_python_patch to include source.
@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/vs2008_express_vc_python_patch) and found it was in an excellent condition.

script:
- if note exists %SCRIPTS% mkdir %SCRIPTS%
- xcopy /v %RECIPE_DIR%\\setup_x64.bat %SCRIPTS%\\setup_x64.bat
- xcopy /v %RECIPE_DIR%\\vs2008 %SCRIPTS%
Copy link
Member

Choose a reason for hiding this comment

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

As things got moved around in interim, will need to change ``%RECIPE_DIR%->%RECIPE_DIR%\vs2008_patch`.

@jakirkham
Copy link
Member

So a bunch of files got moved around in commit ( fb29951 ). I would revert the move as things are a bit dependent on those locations ATM.

@jakirkham
Copy link
Member

Alternatively one could move the rest of the stuff to vs2008_patch and update the paths in meta.yaml to handle this.

@shadowwalkersb
Copy link
Contributor Author

Do you want to keep vs2008_patch or move up setup_x64 and x64?

@shadowwalkersb
Copy link
Contributor Author

Do you want to handle the restructuring? It may be easier. We keep overlapping.

@jakirkham
Copy link
Member

jakirkham commented Sep 28, 2016

My concern here is that the user may not be aware of the ramifications of "installing" this package.

This is why the post link script was decided to be too helpful. Hence we removed it.

It goes beyond installing a package, but modifies the local system. It is "Are you really sure you want to this?" kind of thing, but there is no way of warning the user or prompting. Or, maybe there is?

Ah, but there is no post link script any more. The user must not only install this package, but run the script setup_x64.bat. So this feels like a pretty intentional action IMHO. We also now have the Readme that explains a bit about what happens. That being said, we have many options for improvement.

  1. Add more info to the Readme.
  2. Add a prompt for running the script too.
  3. Add a script to revert the patch.

This all being said, I don't see any of these as blockers to merging this. They all seem like things that could be opened as issues on the feedstock.

@@ -0,0 +1,26 @@
package:
name: vs2008_express_vc_python_patch
version: 1.0
Copy link
Member

Choose a reason for hiding this comment

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

Might make it 1.0.0.

extra:
recipe-maintainers:
- msarahan
- patricksnape
Copy link
Member

@jakirkham jakirkham Sep 28, 2016

Choose a reason for hiding this comment

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

Any interest in being a maintainer, @shadowwalkersb?

Copy link
Member

Choose a reason for hiding this comment

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

Probably should add me too.

Copy link
Member

Choose a reason for hiding this comment

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

Done below. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can always submit a PR to be removed, right? ;-)

Copy link
Member

@jakirkham jakirkham Sep 28, 2016

Choose a reason for hiding this comment

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

I suppose. 😢

To be honest though, I don't expect this to see lots of activity. It basically works. @patricksnape put a lot of work in getting this put together right.

@jakirkham jakirkham mentioned this pull request Sep 28, 2016
@shadowwalkersb
Copy link
Contributor Author

shadowwalkersb commented Sep 28, 2016

This is why the post link script was decided to be too helpful. Hence we removed it.

That makes sense.

Ah, but there is no post link script any more. The user must not only install this package, but run the script setup_x64.bat.

Was missing that point. Now, it makes more sense.

Thanks!

@jakirkham
Copy link
Member

Also forgot to note that running that script basically requires admin privileges. So that question will certainly be asked too.

@jakirkham
Copy link
Member

Copying all of you as you were all involved in the discussion in PR ( #617 ). This takes over that PR and addresses many of the concerns raised by many of you over there. Would be great if you could take a quick look and let us know if it seems ok. Then we can get this merged and integrated into our CI builds. Thanks in advance.

cc @msarahan @pelson @patricksnape @JanSchulz


build:
number: 0
skip: true # [not win]
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we should only run this on Appveyor? We could add something like # [not win and environ['APPVEYOR'] != "True"]. This would prevent someone from downloading a recipe and having it mess with their system.

Copy link
Member

Choose a reason for hiding this comment

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

Why would it mess with their system? We dropped the post link script.

Copy link
Contributor

Choose a reason for hiding this comment

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

If someone relies on this package, presumably they will run the setup_x64.bat? This then messes with the users system?

Copy link
Member

Choose a reason for hiding this comment

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

Sure, it does, but couldn't that be desirable?

For instance, I have an old Windows computer that I would like to apply this patch to so that I can build 64-bit VS 2008 binaries with. Is there any reason I should not do that?

Copy link
Contributor

Choose a reason for hiding this comment

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

For a start it will fail if you run it twice (I'm pretty sure). Secondly, it will only run as Administrator and so may fail fairly cryptically if you aren't running in an elevated prompt. Otherwise, no.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, so am not too worried about these ATM. Though I think these are all things that could be raised at the feedstock. Here were a few thoughts along these lines.

@patricksnape
Copy link
Contributor

patricksnape commented Sep 28, 2016

I'm not actually sure why a lot of my conda-build changes got reverted. But this certainly helps on Appveyor for CMake x64 builds. It still remains to be a 'caveat' that people need to know it exists, but it could be useful to point people towards.

@jakirkham
Copy link
Member

jakirkham commented Sep 28, 2016

While you're here @patricksnape, we found some 32-bit reg files in that zip, but we dropped them (IIRC we never used/had them at conda-forge). Are they actually needed for something?

@patricksnape
Copy link
Contributor

It's only for Itanium builds. In fact, I'm not sure you even need the reg files at all - I've never needed them for actual x86_64.

@jakirkham
Copy link
Member

jakirkham commented Sep 28, 2016

Hmm...I thought that was necessary for Visual Studio to find VC Express, no?

@patricksnape
Copy link
Contributor

I think you need the last 5 ones that mention AMD64 - but not the Itanium ones.

@jakirkham
Copy link
Member

So the ones beginning with 600* are IA64 and the ones beginning with 656* are AMD64. However, VC_OBJECTS_PLATFORM_INFO.reg refers to both. Am a little nervous dropping those files if they will still be referred to by VC_OBJECTS_PLATFORM_INFO.reg and don't know enough to safely edit VC_OBJECTS_PLATFORM_INFO.reg. Would it hurt to just leave them? Or do you know how you want these modified?

@patricksnape
Copy link
Contributor

I don't think it really matters - was just pointing out that there are probably more than the required number of files here. You can likely leave this as is.

@jakirkham
Copy link
Member

Thoughts on this, @pelson @msarahan ?

@patricksnape
Copy link
Contributor

It's all good from me if it seems to fix the cmake issues. Maybe we could add a dummy cmake build for VS2008 x64 to check it actually fixes the issue?

@jakirkham
Copy link
Member

jakirkham commented Oct 9, 2016

Please see PR ( #1737 ), which tests this VS 2008 64-bit strategy and demonstrates the problem and that it fixes it.

Edit: Added a closes note in the OP to close this testing PR when we merge this PR.

@jakirkham
Copy link
Member

jakirkham commented Oct 9, 2016

Would love if @msarahan and @pelson could comment. Though at this point I'm tempted to just merge this as it is a working usable strategy that we can already put into play.

@patricksnape
Copy link
Contributor

Thanks for the dummy build @jakirkham! I'm happy with this to go in now!

Copy link
Member

@msarahan msarahan left a comment

Choose a reason for hiding this comment

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

Looks fine to me. This probably only works on appveyor and other places where people have admin rights. That shouldn't prevent it from getting out there, it should just be a known limitation.

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.

5 participants