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

modified meta.yaml for Windows build using msys2 #34

Closed
wants to merge 4 commits into from
Closed

modified meta.yaml for Windows build using msys2 #34

wants to merge 4 commits into from

Conversation

tjwilli58
Copy link

@tjwilli58 tjwilli58 commented Aug 12, 2018

Checklist

  • Used a fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (@conda-forge-admin, please rerender)
  • Ensured the license file is being packaged.

@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.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-webservice.

I tried to re-render for you, but it looks like there was nothing to do.

@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.

@scopatz
Copy link
Member

scopatz commented Aug 13, 2018

Thanks for putting this in @tjwilli58. This doesn't have a build.bat script and so it just builds an empty package, which I think is confusing for anyone wanting to use the package on windows.

@tjwilli58
Copy link
Author

@scopatz , I was thinking that bld.bat was optional, that's why I didn't add it. I misread that paragraph and didn't think I needed it. I'll add it tonight
Thanks.

@tjwilli58
Copy link
Author

Ok, so I copy the default bld.bat to the recipe folder, but when I try to build it I get an error at the end:

C:\Users\Tim\Miniconda3\conda-bld\glib_1534209126702\_h_env\python.exe: can't open file 'setup.py': [Errno 2] No such file or directory
Traceback (most recent call last):
  File "C:\Users\Tim\Miniconda3\Scripts\conda-build-script.py", line 10, in <module>
    sys.exit(main())
  File "C:\Users\Tim\Miniconda3\lib\site-packages\conda_build\cli\main_build.py", line 420, in main
    execute(sys.argv[1:])
  File "C:\Users\Tim\Miniconda3\lib\site-packages\conda_build\cli\main_build.py", line 411, in execute
    verify=args.verify)
  File "C:\Users\Tim\Miniconda3\lib\site-packages\conda_build\api.py", line 200, in build
    notest=notest, need_source_download=need_source_download, variants=variants)
  File "C:\Users\Tim\Miniconda3\lib\site-packages\conda_build\build.py", line 2177, in build_tree
    notest=notest,
  File "C:\Users\Tim\Miniconda3\lib\site-packages\conda_build\build.py", line 1385, in build
    windows.build(m, build_file, stats=build_stats)
  File "C:\Users\Tim\Miniconda3\lib\site-packages\conda_build\windows.py", line 297, in build
    check_call_env(cmd, cwd=src_dir, stats=stats)
  File "C:\Users\Tim\Miniconda3\lib\site-packages\conda_build\utils.py", line 310, in check_call_env
    return _func_defaulting_env_to_os_environ('call', *popenargs, **kwargs)
  File "C:\Users\Tim\Miniconda3\lib\site-packages\conda_build\utils.py", line 290, in _func_defaulting_env_to_os_environ
    raise subprocess.CalledProcessError(proc.returncode, _args)
subprocess.CalledProcessError: Command '['cmd.exe', '/c', 'bld.bat']' returned non-zero exit status 1.

So what's the correct way to do this? Not having a bld.bat, I have a package in Miniconda3\conda-bld\win-64

@pkgw
Copy link
Contributor

pkgw commented Aug 14, 2018

@tjwilli58 From what you paste, I think the default file is only going to work for a pure-Python package. For glib, the process is going to be more demanding. Have you been consulting this documentation? Based on a very quick scan of that, I'd suggest you use the meson-based approach, but for the "autoconfiscated" approach you could try emulating the approach taken for the X.org libraries, which is quite tedious; the three files here give an example of the hoops that one needs to jump through.

@tjwilli58
Copy link
Author

tjwilli58 commented Aug 15, 2018

Thanks for the link @pkgw . No, I haven't seen this documentation. It should help me get up to speed on understanding building packages. What I'd like to do is build these packages w/o MSVC, so I'm trying to go the MSYS2 route. As you already know, building glib, gobject-introspection is just preparation for building pygobject. (And that's because my goal is to have gstreamer and all gst-plugins available in miniconda.) The setup.py file for pygobject does not support msvc compiler. The package is available in MSYS2 though.

def filter_compiler_arguments(compiler, args):
    """Given a compiler instance and a list of compiler warning flags
    returns the list of supported flags.
    """

    if compiler.compiler_type == "msvc":
        # TODO
        return []

    extra = []


        def build_ext(ext):
            if compiler.compiler_type == "msvc":
                raise Exception("MSVC support not implemented")

@tjwilli58
Copy link
Author

Closing this pull request until I figure things out.

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.

5 participants