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

Windows support #4

Merged
merged 3 commits into from Jan 24, 2017
Merged

Windows support #4

merged 3 commits into from Jan 24, 2017

Conversation

tarcisiofischer
Copy link

Add support for Windows and re-rendered with conda-smithy 1.7.0

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

@tarcisiofischer
Copy link
Author

cc @nicoddemus

@nicoddemus
Copy link
Member

nicoddemus commented Dec 29, 2016

LGTM, let's see how it fares on AppVeyor.

@tarcisiofischer would mind add me (and you if you want) as maintainer of this package? We might want to help update it in the future.

@jakirkham
Copy link
Member

So I think my Windows install step is wrong. Guessing it should be moved to %SCRIPTS%.

@jakirkham
Copy link
Member

Also please enable CircleCI on your fork of this feedstock and repush.

@tarcisiofischer
Copy link
Author

tarcisiofischer commented Dec 30, 2016

So, I tried to make a local build (conda build waf-feedstock in Windows), and it seems that copying the file into the %SCRIPTS% path will work.

The only problem is that conda-build tries to read the file to do some checking, but fails to do so because of the file encoding (https://github.com/conda/conda-build/blob/master/conda_build/windows.py#L45)

I believe the waf file should be opened with encoding='iso-8859-1'.
Making a local change replacing with the code bellow builds the package successfully, but is not a solution:

with open(join(scripts_dir, fn), encoding='iso-8859-1') as f:

Any suggestions here? I'm unsure how this case should be handled (Or if I should be asking on the conda-build project)

@jakirkham
Copy link
Member

Go ahead and raise that as an issue on conda-build. Let's see what they say.

@jakirkham
Copy link
Member

Did you raise an issue with conda-build, @tarcisiofischer ? If so, could we have a link to it?

@jakirkham
Copy link
Member

Just to see, going to toggle this to restart the CIs. conda-build 2 is now in use and I'd like to know if this problem persists in this version.

@jakirkham jakirkham closed this Jan 9, 2017
@jakirkham jakirkham reopened this Jan 9, 2017
@jakirkham
Copy link
Member

Also feel free to disable CircleCI on your fork @tarcisiofischer . We recently got CircleCI back online at conda-forge.

@tarcisiofischer
Copy link
Author

Posted on conda-build. conda/conda-build#1632
Thanks for the help.

@jakirkham
Copy link
Member

Do you want to give this another go, @tarcisiofischer? conda-build 2.1.1 should fix this issue and is out on conda-forge.

@nicoddemus
Copy link
Member

FWIW just tried in my local installation using @tarcisiofischer's meta.yaml and I get what it seems to be the same error:

...
   adding waflib\extras\boost.py as waflib/extras/boost.py
   adding waflib\extras\cython.py as waflib/extras/cython.py
   adding waflib\extras\swig.py as waflib/extras/swig.py
   adding waflib\extras\use_config.py as waflib/extras/use_config.py
   adding waflib\extras\__init__.py as waflib/extras/__init__.py
Waf: Leaving directory `D:\Programming\Miniconda3\conda-bld\waf-conda_1484775768299\work\waf-waf-1.8.21\build'
'build' finished successfully (1.023s)

(D:\Programming\Miniconda3\conda-bld\waf-conda_1484775768299\_b_env) %@EXECSTR[python X:\dotfiles\\get_prompt.py]copy waf "D:\Programming\Miniconda3\conda-bld\waf-conda_1484775768299\_b_env\Scripts"
        1 arquivo(s) copiado(s).
Traceback (most recent call last):
  File "D:\Programming\Miniconda3\Scripts\conda-build-script.py", line 5, in <module>
    sys.exit(conda_build.cli.main_build.main())
  File "D:\Programming\Miniconda3\lib\site-packages\conda_build\cli\main_build.py", line 321, in main
    execute(sys.argv[1:])
  File "D:\Programming\Miniconda3\lib\site-packages\conda_build\cli\main_build.py", line 312, in execute
    noverify=args.no_verify)
  File "D:\Programming\Miniconda3\lib\site-packages\conda_build\api.py", line 89, in build
    need_source_download=need_source_download, config=config)
  File "D:\Programming\Miniconda3\lib\site-packages\conda_build\build.py", line 1460, in build_tree
    config=config)
  File "D:\Programming\Miniconda3\lib\site-packages\conda_build\build.py", line 1010, in build
    windows.build(m, build_file, config=config)
  File "D:\Programming\Miniconda3\lib\site-packages\conda_build\windows.py", line 233, in build
    fix_staged_scripts(join(config.build_prefix, 'Scripts'))
  File "D:\Programming\Miniconda3\lib\site-packages\conda_build\windows.py", line 47, in fix_staged_scripts
    line = bs4.UnicodeDammit(f.readline()).unicode_markup.lower()
  File "D:\Programming\Miniconda3\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 4240: character maps to <undefined>

Conda versions:

$ conda list conda
# packages in environment at D:\Programming\Miniconda3:
#
anaconda-client           1.5.1                    py35_0    conda-forge
conda                     4.2.13                   py35_0    conda-forge
conda-build               2.1.1                    py35_0    conda-forge
conda-build-all           1.0.0                    py35_0    conda-forge
conda-env                 2.6.0                         0    conda-forge
conda-smithy              2.0.0                    py35_0    conda-forge
conda-verify              2.0.0                    py35_0

@jakirkham
Copy link
Member

Any ideas @msarahan?

@nicoddemus
Copy link
Member

This has been fixed in 2.1.2 (conda/conda-build#1685).

@jakirkham
Copy link
Member

Neat! Let's get it packaged. Would you like to do a PR?

ref: https://github.com/conda-forge/conda-build-feedstock

@nicoddemus
Copy link
Member

Sure thing, done: conda-forge/conda-build-feedstock#11

@nicoddemus
Copy link
Member

@jakirkham the feedstocks use the latest available conda-build in conda-forge, or are they pinned to a specific version? If the former is true, it is just a matter of @tarcisiofischer closing/reopening this PR once conda-forge/conda-build-feedstock#11 is merged.

@jakirkham
Copy link
Member

Currently we do just use latest. We could open and close to restart. Though Travis CI has been getting pretty slammed during the week. Would propose that we just restart AppVeyor and see how that goes. I expect the patch release didn't break Unix builds, but we could also restart CircleCI as a demonstrative measure. If we restart Travis though, we might be waiting until the end of day to see this merged. Just a thought.

@nicoddemus
Copy link
Member

Sounds good. Let's see how it goes then.

@jakirkham
Copy link
Member

Passing. 🎉

@jakirkham jakirkham merged commit 1c0892e into conda-forge:master Jan 24, 2017
@nicoddemus
Copy link
Member

Cool, thanks @tarcisiofischer and @jakirkham!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants