conda skeleton fails on Windows...

0 views
Skip to first unread message

Chris Barker

unread,
Feb 26, 2015, 7:12:17 PM2/26/15
to conda
I'm having trouble getting conda skelton pypi to work on Windows 64. Seems to be a problem with patch (note also  that I needed to conda install patch to get this far -- it would be nice id conda could do that for me -- or warn me).

I have the same error with multiple different packages:

PS C:\Users\Chris.Barker\Documents\GNOME-dev\pygnome\conda_packages> conda skeleton pypi geojson
Downloading geojson (use --no-download to skip this step)
Using cached download
Unpacking geojson...
done
working in c:\users\chris~1.bar\appdata\local\temp\1\tmpjmdlk2conda_skeleton_geojson
Fetching package metadata: ..........
Solving package specifications: .
Applying patch: 'c:\\users\\chris~1.bar\\appdata\\local\\temp\\1\\tmpjmdlk2conda_skeleton_geojson\\pypi-distutils.patch'

69 unparsed bytes left at the end of stream
file 1/1:        core.py
 hunk no.1 doesn't match source file at line 165
  expected:
  actual  :                 raise SystemExit, "error: " + str(msg)
source file is different - core.py
An unexpected error has occurred, please consider sending the
following traceback to the conda GitHub issue tracker at:


Include the output of the command 'conda info' in your report.


Traceback (most recent call last):
  File "C:\Users\Chris.Barker\AppData\Local\Continuum\Anaconda\Scripts\conda-skeleton-script.py", line 4, in <module>
    sys.exit(main())
  File "C:\Users\Chris.Barker\AppData\Local\Continuum\Anaconda\lib\site-packages\conda_build\main_skeleton.py", line 131
, in main
    args_func(args, p)
  File "C:\Users\Chris.Barker\AppData\Local\Continuum\Anaconda\lib\site-packages\conda_build\main_build.py", line 308, i
n args_func
    args.func(args, p)
  File "C:\Users\Chris.Barker\AppData\Local\Continuum\Anaconda\lib\site-packages\conda_build\main_skeleton.py", line 142
, in execute
    pypi.main(args, parser)
  File "C:\Users\Chris.Barker\AppData\Local\Continuum\Anaconda\lib\site-packages\conda_build\pypi.py", line 407, in main

    run_setuppy(src_dir, tempdir, args)
  File "C:\Users\Chris.Barker\AppData\Local\Continuum\Anaconda\lib\site-packages\conda_build\pypi.py", line 596, in run_
setuppy
    apply_patch(join(stdlib_dir, 'distutils'), patch)
  File "C:\Users\Chris.Barker\AppData\Local\Continuum\Anaconda\lib\site-packages\conda_build\source.py", line 209, in ap
ply_patch
    check_call([patch, '-p0', '-i', path], cwd=src_dir)
  File "C:\Users\Chris.Barker\AppData\Local\Continuum\Anaconda\lib\subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Users\\Chris.Barker\\AppData\\Local\\Continuum\\Anaconda\\Scripts\\patch.b
at', '-p0', '-i', 'c:\\users\\chris~1.bar\\appdata\\local\\temp\\1\\tmpjmdlk2conda_skeleton_geojson\\pypi-distutils.patc
h']' returned non-zero exit status -1


Any hints here? does this ever work on windows??

PS C:\Users\Chris.Barker\Documents\GNOME-dev\pygnome\conda_packages> conda info
Current conda install:

             platform : win-64
        conda version : 3.9.1
  conda-build version : 1.10.2
       python version : 2.7.8.final.0
     requests version : 2.5.3
     root environment : C:\Users\Chris.Barker\AppData\Local\Continuum\Anaconda  (writable)
  default environment : C:\Users\Chris.Barker\AppData\Local\Continuum\Anaconda
     envs directories : C:\Users\Chris.Barker\AppData\Local\Continuum\Anaconda\envs
        package cache : C:\Users\Chris.Barker\AppData\Local\Continuum\Anaconda\pkgs
                        http://conda.binstar.org/NOAA-ORR-ERD/noarch/
                        http://conda.binstar.org/asmeurer/win-64/
                        http://conda.binstar.org/asmeurer/noarch/
                        http://repo.continuum.io/pkgs/free/win-64/
                        http://repo.continuum.io/pkgs/free/noarch/
                        http://repo.continuum.io/pkgs/pro/win-64/
                        http://repo.continuum.io/pkgs/pro/noarch/
          config file : C:\Users\Chris.Barker\.condarc
    is foreign system : False



--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris....@noaa.gov

Aaron Meurer

unread,
Feb 27, 2015, 3:06:53 PM2/27/15
to Chris Barker, conda
Yeah, this is a known issue. I think you currently can't use it on
Windows, because it requires a real patch program. Maybe if you find
some Windows port of patch and install that on your PATH (and conda
remove patch).

Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups
> "conda - Public" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to conda+un...@continuum.io.
> To post to this group, send email to co...@continuum.io.
> Visit this group at http://groups.google.com/a/continuum.io/group/conda/.

Chris Barker

unread,
Feb 27, 2015, 3:14:19 PM2/27/15
to Aaron Meurer, conda
On Fri, Feb 27, 2015 at 12:06 PM, Aaron Meurer <aaron....@continuum.io> wrote:
Yeah, this is a known issue. I think you currently can't use it on
Windows, because it requires a real patch program.

Darn. maybe it should give an error or something when attempted?

What is it using patch for? could we hack together a bit of pure python that would do that job and remove the dependency?

But it seems the tack I'm taking now is the way to go -- build the conda package description on a another system, then run conda build on Windows...

-Chris

Aaron Meurer

unread,
Feb 27, 2015, 3:24:10 PM2/27/15
to Chris Barker, conda
It looks like the patch from
http://gnuwin32.sourceforge.net/packages/patch.htm works. We should
replace our current patch package on Windows with that.

patch is used to patch distutils, so that it writes the package
metadata to a file instead of installing the package.

Aaron Meurer

Chris Barker

unread,
Feb 27, 2015, 3:58:24 PM2/27/15
to Aaron Meurer, conda
On Fri, Feb 27, 2015 at 12:23 PM, Aaron Meurer <aaron....@continuum.io> wrote:
It looks like the patch from
http://gnuwin32.sourceforge.net/packages/patch.htm works. We should
replace our current patch package on Windows with that

sounds good -- maybe I'll give it a try.

patch is used to patch distutils, so that it writes the package
metadata to a file instead of installing the package.

got it - that sounds like it may be a pretty simple search and replace operation, but if we can easily get a patch that works, then might as well keep it that way.

Thanks,
  -Chris
Reply all
Reply to author
Forward
0 new messages