conda-forge / pyogrio-feedstock

A conda-smithy repository for pyogrio.
BSD 3-Clause "New" or "Revised" License
0 stars 9 forks source link

Add Windows + update for v0.2.0 #7

Closed jorisvandenbossche closed 3 years ago

jorisvandenbossche commented 3 years ago

See https://github.com/conda-forge/pyogrio-feedstock/issues/6

I don't have windows myself, so can't debug this locally, but just to see what it already gives here on CI.

Checklist

conda-forge-linter commented 3 years ago

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.

jorisvandenbossche commented 3 years ago

@conda-forge-admin, please rerender

jorisvandenbossche commented 3 years ago

Hmm, the log output is not giving much clues ..

``` Processing d:\bld\pyogrio_1614950468418\work Created temporary directory: C:\Users\VssAdministrator\AppData\Local\Temp\pip-req-build-md9g1kzj Added file:///D:/bld/pyogrio_1614950468418/work to build tracker 'C:\\Users\\VssAdministrator\\AppData\\Local\\Temp\\pip-req-tracker-pbpnjzqa' Created temporary directory: C:\Users\VssAdministrator\AppData\Local\Temp\pip-modern-metadata-4s9acswb abstract_dist.prepare_distribution_metadata(finder, build_isolation) File "%PREFIX%\lib\site-packages\pip\_internal\distributions\sdist.py", line 41, in prepare_distribution_metadata self.req.prepare_metadata() File "%PREFIX%\lib\site-packages\pip\_internal\req\req_install.py", line 549, in prepare_metadata self.metadata_directory = self._generate_metadata() File "%PREFIX%\lib\site-packages\pip\_internal\req\req_install.py", line 534, in _generate_metadata return generate_metadata( File "%PREFIX%\lib\site-packages\pip\_internal\operations\build\metadata.py", line 34, in generate_metadata distinfo_dir = backend.prepare_metadata_for_build_wheel( File "%PREFIX%\lib\site-packages\pip\_vendor\pep517\wrappers.py", line 193, in prepare_metadata_for_build_wheel return self._call_hook('prepare_metadata_for_build_wheel', { File "%PREFIX%\lib\site-packages\pip\_vendor\pep517\wrappers.py", line 274, in _call_hook self._subprocess_runner( File "%PREFIX%\lib\site-packages\pip\_internal\utils\subprocess.py", line 289, in runner call_subprocess( File "%PREFIX%\lib\site-packages\pip\_internal\utils\subprocess.py", line 258, in call_subprocess raise InstallationSubprocessError(proc.returncode, command_desc) pip._internal.exceptions.InstallationSubprocessError: Command errored out with exit status 1: '%PREFIX%\python.exe' '%PREFIX%\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\VSSADM~1\AppData\Local\Temp\tmpsoxyx9ct' Check the logs for full command output. Removed file:///D:/bld/pyogrio_1614950468418/work from build tracker 'C:\\Users\\VssAdministrator\\AppData\\Local\\Temp\\pip-req-tracker-pbpnjzqa' Removed build tracker: 'C:\\Users\\VssAdministrator\\AppData\\Local\\Temp\\pip-req-tracker-pbpnjzqa' Traceback (most recent call last): File "C:\Miniconda\Scripts\conda-build-script.py", line 10, in sys.exit(main()) File "C:\Miniconda\lib\site-packages\conda_build\cli\main_build.py", line 481, in main execute(sys.argv[1:]) File "C:\Miniconda\lib\site-packages\conda_build\cli\main_build.py", line 472, in execute verify=args.verify, variants=args.variants, cache_dir=args.cache_dir) File "C:\Miniconda\lib\site-packages\conda_build\api.py", line 195, in build variants=variants File "C:\Miniconda\lib\site-packages\conda_build\build.py", line 3073, in build_tree notest=notest, File "C:\Miniconda\lib\site-packages\conda_build\build.py", line 2159, in build windows.build(m, build_file, stats=build_stats, provision_only=provision_only) File "C:\Miniconda\lib\site-packages\conda_build\windows.py", line 299, in build check_call_env(cmd, cwd=m.config.work_dir, stats=stats, rewrite_stdout_env=rewrite_env) File "C:\Miniconda\lib\site-packages\conda_build\utils.py", line 412, in check_call_env return _func_defaulting_env_to_os_environ('call', *popenargs, **kwargs) File "C:\Miniconda\lib\site-packages\conda_build\utils.py", line 392, in _func_defaulting_env_to_os_environ raise subprocess.CalledProcessError(proc.returncode, _args) subprocess.CalledProcessError: Command '['cmd.exe', '/d', '/c', 'conda_build.bat']' returned non-zero exit status 1. ##[error]Cmd.exe exited with code '1'. ```
brendan-ward commented 3 years ago

@jorisvandenbossche thanks for working on this!

I was thinking about trying to setup build & test w/ Github actions to see if that would help identify some of the build issues here (agree: the logs are pretty inscrutible). Was also thinking of looking at the conda recipe for Fiona to see if that yields any hints (unless you've already done so?)

jorisvandenbossche commented 3 years ago

Fiona has a bld.bat script: https://github.com/conda-forge/fiona-feedstock/blob/master/recipe/bld.bat, but, it also has such a similar script for linux. While here that doesn't seem needed?

jorisvandenbossche commented 3 years ago

Of course, fiona's setup.py is also different, so many potential differences.

brendan-ward commented 3 years ago

@jorisvandenbossche update: I've been working on a CI setup including Windows in this branch. As part of that, I've brought the setup.py and other config closer in line with Fiona (in particular, loading DLLs on Windows with Python >= 3.8 has extra challenges). There were a lot of things that didn't work properly for Windows based on our original setup which likely contributed to failures here.

I'm still debugging why the DLLs load correctly when the module is loaded directly but fail badly when loaded from the tests. Once we have Windows CI tests passing, we can try and make corresponding updates here.

jorisvandenbossche commented 3 years ago

@brendan-ward do you want to cut a new release so we can update this?

brendan-ward commented 3 years ago

@jorisvandenbossche Just added a new release: https://github.com/brendan-ward/pyogrio/releases/tag/v0.2.0

Thanks for the help here!

jorisvandenbossche commented 3 years ago

@conda-forge-admin, please rerender

jorisvandenbossche commented 3 years ago

@brendan-ward thanks! I added an sdist to the release, and updating the PR

jorisvandenbossche commented 3 years ago

The latest edit gave green builds! (not fully sure why it is needed here, though ..)

jorisvandenbossche commented 3 years ago

Going to merge this, so we have packages for the 0.2.0 release, and we can test the windows packages in practice

brendan-ward commented 3 years ago

Thank you so much @jorisvandenbossche for getting this working for Windows! 👏