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

Support packages from __init__.pyx files #2665

Closed
ghost opened this issue Oct 17, 2018 · 8 comments
Closed

Support packages from __init__.pyx files #2665

ghost opened this issue Oct 17, 2018 · 8 comments

Comments

@ghost
Copy link

ghost commented Oct 17, 2018

I'm trying to build a project of mine on Windows, but errors out with some weird linker error. On Linux everything is fine. The project repositories are public, so this should be easy for you to try for yourself:

.python-win\python.exe -m pip install -U Cython
Requirement already up-to-date: Cython in c:\users\me\appdata\roaming\python\python37\site-packages (0.29)
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
.python-win\python.exe -m pip install -U https://github.com/JonasT/nettools/archive/master.zip
Collecting https://github.com/JonasT/nettools/archive/master.zip
  Downloading https://github.com/JonasT/nettools/archive/master.zip
     - 133kB 930kB/s
Installing collected packages: nettools
  Found existing installation: nettools 0.1
    Uninstalling nettools-0.1:
      Successfully uninstalled nettools-0.1
  Running setup.py install for nettools ... done
Successfully installed nettools-0.1
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
.python-win\python.exe -m pip install -U https://github.com/JonasT/wobblui/archive/b37bcd538193ab092920e931f53d5d55c79be6ec.zip
Collecting https://github.com/JonasT/wobblui/archive/b37bcd538193ab092920e931f53d5d55c79be6ec.zip
  Downloading https://github.com/JonasT/wobblui/archive/b37bcd538193ab092920e931f53d5d55c79be6ec.zip
     \ 2.0MB 25.6MB/s
Requirement not upgraded as not directly required: PySDL2>=0.9.6 in c:\users\me\appdata\roaming\python\python37\site-packages (from wobblui==2018.8.post2) (0.9.6)
Requirement not upgraded as not directly required: Cython in c:\users\me\appdata\roaming\python\python37\site-packages (from wobblui==2018.8.post2) (0.29)
Requirement not upgraded as not directly required: Pillow in c:\users\me\appdata\roaming\python\python37\site-packages (from wobblui==2018.8.post2) (5.3.0)
Requirement not upgraded as not directly required: nettools in c:\myproject\tools\windows\.python-win\lib\site-packages (from wobblui==2018.8.post2) (0.1)
Installing collected packages: wobblui
  Running setup.py install for wobblui ... error
    Complete output from command C:\myproject\tools\windows\.python-win\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\me\\AppData\\Local\\Temp\\pip-req-build-rvvpu7mo\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\me\AppData\Local\Temp\pip-record-l151ayce\install-record.txt --single-version-externally-managed --compile:
    C:\myproject\tools\windows\.python-win\Lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'long_description_content_type'
      warnings.warn(msg)
    C:\myproject\tools\windows\.python-win\lib\site-packages\setuptools\dist.py:397: UserWarning: Normalizing '2018.08-2' to '2018.8.post2'
      normalized_version,
    running install
    running build
    running build_py
    package init file 'src\wobblui\__init__.py' not found (or not a regular file)
    creating build
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\box.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\button.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\clipboard.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\color.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\cssparse.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\filedialog.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\gfx.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\image.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\keyboard.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\label.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\list.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\menu.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\mouse.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\osinfo.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\scrollbarwidget.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\sdlinit.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\style.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\test_richtext.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\textedit.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\textentry.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\timer.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\topbar.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\uiconf.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\version.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\widgetman.py -> build\lib.win-amd64-3.7\wobblui
    copying src\wobblui\window.py -> build\lib.win-amd64-3.7\wobblui
    creating build\lib.win-amd64-3.7\wobblui\font
    copying src\wobblui\font\info.py -> build\lib.win-amd64-3.7\wobblui\font
    copying src\wobblui\font\otfttf.py -> build\lib.win-amd64-3.7\wobblui\font
    copying src\wobblui\font\query.py -> build\lib.win-amd64-3.7\wobblui\font
    copying src\wobblui\font\__init__.py -> build\lib.win-amd64-3.7\wobblui\font
    creating build\lib.win-amd64-3.7\wobblui\p4arecipes
    copying src\wobblui\p4arecipes\nettools.py -> build\lib.win-amd64-3.7\wobblui\p4arecipes
    copying src\wobblui\p4arecipes\wobblui.py -> build\lib.win-amd64-3.7\wobblui\p4arecipes
    copying src\wobblui\p4arecipes\__init__.py -> build\lib.win-amd64-3.7\wobblui\p4arecipes
    creating build\lib.win-amd64-3.7\wobblui\font\packaged-fonts
    copying src\wobblui\font\packaged-fonts\SourceCodePro-Regular.ttf -> build\lib.win-amd64-3.7\wobblui\font\packaged-fonts
    copying src\wobblui\font\packaged-fonts\texgyreadventor-bold.ttf -> build\lib.win-amd64-3.7\wobblui\font\packaged-fonts
    copying src\wobblui\font\packaged-fonts\texgyreadventor-bolditalic.ttf -> build\lib.win-amd64-3.7\wobblui\font\packaged-fonts
    copying src\wobblui\font\packaged-fonts\texgyreadventor-italic.ttf -> build\lib.win-amd64-3.7\wobblui\font\packaged-fonts
    copying src\wobblui\font\packaged-fonts\texgyreadventor-regular.ttf -> build\lib.win-amd64-3.7\wobblui\font\packaged-fonts
    copying src\wobblui\font\packaged-fonts\texgyreheros-bold.ttf -> build\lib.win-amd64-3.7\wobblui\font\packaged-fonts
    copying src\wobblui\font\packaged-fonts\texgyreheros-bolditalic.ttf -> build\lib.win-amd64-3.7\wobblui\font\packaged-fonts
    copying src\wobblui\font\packaged-fonts\texgyreheros-italic.ttf -> build\lib.win-amd64-3.7\wobblui\font\packaged-fonts
    copying src\wobblui\font\packaged-fonts\texgyreheros-regular.ttf -> build\lib.win-amd64-3.7\wobblui\font\packaged-fonts
    copying src\wobblui\font\packaged-fonts\texgyrepagella-bold.ttf -> build\lib.win-amd64-3.7\wobblui\font\packaged-fonts
    copying src\wobblui\font\packaged-fonts\texgyrepagella-bolditalic.ttf -> build\lib.win-amd64-3.7\wobblui\font\packaged-fonts
    copying src\wobblui\font\packaged-fonts\texgyrepagella-italic.ttf -> build\lib.win-amd64-3.7\wobblui\font\packaged-fonts
    copying src\wobblui\font\packaged-fonts\texgyrepagella-regular.ttf -> build\lib.win-amd64-3.7\wobblui\font\packaged-fonts
    copying src\wobblui\font\packaged-fonts\SourceCodePro-Regular-LICENSE.md -> build\lib.win-amd64-3.7\wobblui\font\packaged-fonts
    copying src\wobblui\font\packaged-fonts\texgyre-LICENSE.md -> build\lib.win-amd64-3.7\wobblui\font\packaged-fonts
    creating build\lib.win-amd64-3.7\wobblui\img
    copying src\wobblui\img\add.png -> build\lib.win-amd64-3.7\wobblui\img
    copying src\wobblui\img\arrow_left.png -> build\lib.win-amd64-3.7\wobblui\img
    copying src\wobblui\img\cross.png -> build\lib.win-amd64-3.7\wobblui\img
    copying src\wobblui\img\folder.png -> build\lib.win-amd64-3.7\wobblui\img
    copying src\wobblui\img\hourglass.png -> build\lib.win-amd64-3.7\wobblui\img
    copying src\wobblui\img\hovercircle.png -> build\lib.win-amd64-3.7\wobblui\img
    copying src\wobblui\img\more.png -> build\lib.win-amd64-3.7\wobblui\img
    copying src\wobblui\img\outandup.png -> build\lib.win-amd64-3.7\wobblui\img
    copying src\wobblui\img\sandwich.png -> build\lib.win-amd64-3.7\wobblui\img
    copying src\wobblui\img\save.png -> build\lib.win-amd64-3.7\wobblui\img
    running build_ext
    C:\Users\me\AppData\Roaming\Python\Python37\site-packages\Cython\Compiler\Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\cache.pyx
      tree = Parsing.p_module(s, pxd, full_module_name)
    Compiling C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\cache.pyx because it changed.
    [1/1] Cythonizing C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\cache.pyx
    Compiling C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\event.pyx because it changed.
    [1/1] Cythonizing C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\event.pyx
    Compiling C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\perf.pyx because it changed.
    [1/1] Cythonizing C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\perf.pyx
    Compiling C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\richtext.pyx because it changed.
    [1/1] Cythonizing C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\richtext.pyx
    Compiling C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\widget.pyx because it changed.
    [1/1] Cythonizing C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\widget.pyx
    Compiling C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\widget_base.pyx because it changed.
    [1/1] Cythonizing C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\widget_base.pyx
    Compiling C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\woblog.pyx because it changed.
    [1/1] Cythonizing C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\woblog.pyx
    Compiling C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\__init__.pyx because it changed.
    [1/1] Cythonizing C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\__init__.pyx
    Compiling C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\font\manager.pyx because it changed.
    [1/1] Cythonizing C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\font\manager.pyx
    Compiling C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\font\sdlfont.pyx because it changed.
    [1/1] Cythonizing C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\src\wobblui\font\sdlfont.pyx
    building 'wobblui.cache' extension
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    creating build\temp.win-amd64-3.7\Release\src
    creating build\temp.win-amd64-3.7\Release\src\wobblui
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\myproject\tools\windows\.python-win\include -IC:\myproject\tools\windows\.python-win\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcsrc\wobblui\cache.c /Fobuild\temp.win-amd64-3.7\Release\src\wobblui\cache.obj
    cache.c
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\myproject\tools\windows\.python-win\libs /LIBPATH:C:\myproject\tools\windows\.python-win\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\um\x64" /EXPORT:PyInit_cache build\temp.win-amd64-3.7\Release\src\wobblui\cache.obj /OUT:build\lib.win-amd64-3.7\wobblui\cache.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\src\wobblui\cache.cp37-win_amd64.lib
       Creating library build\temp.win-amd64-3.7\Release\src\wobblui\cache.cp37-win_amd64.lib and object build\temp.win-amd64-3.7\Release\src\wobblui\cache.cp37-win_amd64.exp
    Generating code
    Finished generating code
    building 'wobblui.event' extension
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\myproject\tools\windows\.python-win\include -IC:\myproject\tools\windows\.python-win\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcsrc\wobblui\event.c /Fobuild\temp.win-amd64-3.7\Release\src\wobblui\event.obj
    event.c
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\myproject\tools\windows\.python-win\libs /LIBPATH:C:\myproject\tools\windows\.python-win\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\um\x64" /EXPORT:PyInit_event build\temp.win-amd64-3.7\Release\src\wobblui\event.obj /OUT:build\lib.win-amd64-3.7\wobblui\event.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\src\wobblui\event.cp37-win_amd64.lib
       Creating library build\temp.win-amd64-3.7\Release\src\wobblui\event.cp37-win_amd64.lib and object build\temp.win-amd64-3.7\Release\src\wobblui\event.cp37-win_amd64.exp
    Generating code
    Finished generating code
    building 'wobblui.perf' extension
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\myproject\tools\windows\.python-win\include -IC:\myproject\tools\windows\.python-win\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcsrc\wobblui\perf.c /Fobuild\temp.win-amd64-3.7\Release\src\wobblui\perf.obj
    perf.c
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\myproject\tools\windows\.python-win\libs /LIBPATH:C:\myproject\tools\windows\.python-win\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\um\x64" /EXPORT:PyInit_perf build\temp.win-amd64-3.7\Release\src\wobblui\perf.obj /OUT:build\lib.win-amd64-3.7\wobblui\perf.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\src\wobblui\perf.cp37-win_amd64.lib
       Creating library build\temp.win-amd64-3.7\Release\src\wobblui\perf.cp37-win_amd64.lib and object build\temp.win-amd64-3.7\Release\src\wobblui\perf.cp37-win_amd64.exp
    Generating code
    Finished generating code
    building 'wobblui.richtext' extension
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\myproject\tools\windows\.python-win\include -IC:\myproject\tools\windows\.python-win\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcsrc\wobblui\richtext.c /Fobuild\temp.win-amd64-3.7\Release\src\wobblui\richtext.obj
    richtext.c
    src\wobblui\richtext.c(8277): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    src\wobblui\richtext.c(16462): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    src\wobblui\richtext.c(17881): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    src\wobblui\richtext.c(18502): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    src\wobblui\richtext.c(18803): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    src\wobblui\richtext.c(19076): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\myproject\tools\windows\.python-win\libs /LIBPATH:C:\myproject\tools\windows\.python-win\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\um\x64" /EXPORT:PyInit_richtext build\temp.win-amd64-3.7\Release\src\wobblui\richtext.obj /OUT:build\lib.win-amd64-3.7\wobblui\richtext.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\src\wobblui\richtext.cp37-win_amd64.lib
       Creating library build\temp.win-amd64-3.7\Release\src\wobblui\richtext.cp37-win_amd64.lib and object build\temp.win-amd64-3.7\Release\src\wobblui\richtext.cp37-win_amd64.exp
    Generating code
    Finished generating code
    building 'wobblui.widget' extension
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\myproject\tools\windows\.python-win\include -IC:\myproject\tools\windows\.python-win\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcsrc\wobblui\widget.c /Fobuild\temp.win-amd64-3.7\Release\src\wobblui\widget.obj
    widget.c
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\myproject\tools\windows\.python-win\libs /LIBPATH:C:\myproject\tools\windows\.python-win\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\um\x64" /EXPORT:PyInit_widget build\temp.win-amd64-3.7\Release\src\wobblui\widget.obj /OUT:build\lib.win-amd64-3.7\wobblui\widget.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\src\wobblui\widget.cp37-win_amd64.lib
       Creating library build\temp.win-amd64-3.7\Release\src\wobblui\widget.cp37-win_amd64.lib and object build\temp.win-amd64-3.7\Release\src\wobblui\widget.cp37-win_amd64.exp
    Generating code
    Finished generating code
    building 'wobblui.widget_base' extension
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\myproject\tools\windows\.python-win\include -IC:\myproject\tools\windows\.python-win\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcsrc\wobblui\widget_base.c /Fobuild\temp.win-amd64-3.7\Release\src\wobblui\widget_base.obj
    widget_base.c
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\myproject\tools\windows\.python-win\libs /LIBPATH:C:\myproject\tools\windows\.python-win\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\um\x64" /EXPORT:PyInit_widget_base build\temp.win-amd64-3.7\Release\src\wobblui\widget_base.obj /OUT:build\lib.win-amd64-3.7\wobblui\widget_base.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\src\wobblui\widget_base.cp37-win_amd64.lib
       Creating library build\temp.win-amd64-3.7\Release\src\wobblui\widget_base.cp37-win_amd64.lib and object build\temp.win-amd64-3.7\Release\src\wobblui\widget_base.cp37-win_amd64.exp
    Generating code
    Finished generating code
    building 'wobblui.woblog' extension
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\myproject\tools\windows\.python-win\include -IC:\myproject\tools\windows\.python-win\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcsrc\wobblui\woblog.c /Fobuild\temp.win-amd64-3.7\Release\src\wobblui\woblog.obj
    woblog.c
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\myproject\tools\windows\.python-win\libs /LIBPATH:C:\myproject\tools\windows\.python-win\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\um\x64" /EXPORT:PyInit_woblog build\temp.win-amd64-3.7\Release\src\wobblui\woblog.obj /OUT:build\lib.win-amd64-3.7\wobblui\woblog.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\src\wobblui\woblog.cp37-win_amd64.lib
       Creating library build\temp.win-amd64-3.7\Release\src\wobblui\woblog.cp37-win_amd64.lib and object build\temp.win-amd64-3.7\Release\src\wobblui\woblog.cp37-win_amd64.exp
    Generating code
    Finished generating code
    building 'wobblui.__init__' extension
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\myproject\tools\windows\.python-win\include -IC:\myproject\tools\windows\.python-win\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcsrc\wobblui\__init__.c /Fobuild\temp.win-amd64-3.7\Release\src\wobblui\__init__.obj
    __init__.c
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\myproject\tools\windows\.python-win\libs /LIBPATH:C:\myproject\tools\windows\.python-win\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\um\x64" /EXPORT:PyInit___init__ build\temp.win-amd64-3.7\Release\src\wobblui\__init__.obj /OUT:build\lib.win-amd64-3.7\wobblui\__init__.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\src\wobblui\__init__.cp37-win_amd64.lib
    LINK : error LNK2001: unresolved external symbol PyInit___init__
    build\temp.win-amd64-3.7\Release\src\wobblui\__init__.cp37-win_amd64.lib : fatal error LNK1120: 1 unresolved externals
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x64\\link.exe' failed with exit status 1120

    ----------------------------------------
Command "C:\myproject\tools\windows\.python-win\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\me\\AppData\\Local\\Temp\\pip-req-build-rvvpu7mo\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\me\AppData\Local\Temp\pip-record-l151ayce\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\me\AppData\Local\Temp\pip-req-build-rvvpu7mo\
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Command failed.
C:\myproject\tools\windows>
@ghost
Copy link
Author

ghost commented Oct 26, 2018

Is there anything I could still provide for this issue? Is it some by design problem? I am using some sort of import redirection to work around this now, but it is pretty ugly and I'd like to get rid of it.

@scoder
Copy link
Contributor

scoder commented Nov 18, 2018

Compiled package __init__ files are not as well supported as normal modules, also due to quirks in distutils and CPython's loader. Best to avoid them and use a normal __init__.py instead that imports whatever you want to expose at a package level.

@scoder
Copy link
Contributor

scoder commented Nov 18, 2018

Note that also in normal Python (although there are exceptions), it's not very common and sometimes frowned upon to have a major part of the package implementation in __init__.py.

@ghost
Copy link
Author

ghost commented Nov 18, 2018

Ok but will you fix this? Because while distutils/setuptools indeed also have a bug related to this, it can be worked around and it seems like a cop-out if all projects just go "well it breaks with the other things as well, so why bother" instead of fixing it...

The Cython issue here is much more annoying because it requires complete import redirection which makes the files much less readable. (the setuptools issue can be worked around in the setup.py itself, without affecting the code) So this has a quite bigger impact on packaging and code readability, and it would be really good if it could be fixed

@scoder
Copy link
Contributor

scoder commented Nov 18, 2018

At least in Py3.5, with PEP-489 in place, this should be doable now.

@scoder
Copy link
Contributor

scoder commented Nov 18, 2018

And, in fact, there is a test for this that works in Py3.3+:
https://github.com/cython/cython/blob/master/tests/build/package_compilation.srctree

Note that it uses compiled __init__.py files instead of __init__.pyx files. Maybe we just forgot to also check for the latter at some point during the translation. Investigation/PR welcome.

@scoder scoder changed the title Project build broken on Microsoft Windows, __init__.pyx causes error Support packages from __init__.pyx files Jan 7, 2019
scoder added a commit that referenced this issue Jan 11, 2019
…t just "__init__.py" but also .pxd and .pyx).

Closes #2665.
scoder added a commit that referenced this issue Jan 11, 2019
…t just "__init__.py" but also .pxd and .pyx).

Closes #2665.
@scoder
Copy link
Contributor

scoder commented Jan 11, 2019

__init__.pyx files. Maybe we just forgot to also check for the latter

Looks like it. Note that Py2 does not search for __init__.so files and thus fails to find the package, so this is a Py3-only feature.

@ghost
Copy link
Author

ghost commented Jan 11, 2019

@scoder nice, thanks a lot for fixing it <3 I use python 3 only so that will work fine for me

@scoder scoder added this to the 3.0 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant