AcademySoftwareFoundation / OpenTimelineIO

Open Source API and interchange format for editorial timeline information.
http://opentimeline.io
Apache License 2.0
1.44k stars 283 forks source link

No wheel for Win64 on PyPI for version 0.12.1 #713

Closed Celeborn2BeAlive closed 2 years ago

Celeborn2BeAlive commented 4 years ago

At our studio we need to install opentimelineio in Blender's python distribution on Windows. However it fails using:

BLENDER_PATH/2.82/python/bin/python.exe -m pip install opentimelineio

because some build steps seems necessary (see at the end of the issue for the full error log). We don't want to provide some special python that would be able to do that because all of this is for an addon that should be easy to distribute to any Blender user.

Now I managed to build a wheel for opentimelineio with a my full python 3.7 and installing it in Blender's python distribution seems to work (I add to include the move of dlls described in #667 however). So I suppose all that's needed now for the first command to work in Blender for Win64 would be to upload the wheel to pypi (I've never done it so I can only assume that's the way it is done).

Here is the script I use to build the wheel if you want to reproduce for different versions of python: https://gist.github.com/Celeborn2BeAlive/f6a475e863726d767a6a0669c692e90e

It builds the wheel in a dist/ folder next to the script.

For now we will distribute the wheel with our addon but it would be great if you could distribute that wheel on pipy.

Thanks.

Here is the error log when we try to install from pypi directly in Blender's python, but I'm not sure there is anything to do with that (a non developper Blender user would not have the build environment installed anyway and a pre-built version should be distributed to him):

$ ./2.82/python/bin/python.exe -m pip install opentimelineio --no-cache-dir
Collecting opentimelineio
  Downloading https://files.pythonhosted.org/packages/81/8d/f8a5470adf58c0841a8343debee2fa835861e62f05380933aa2fdc05
    100% |████████████████████████████████| 2.0MB 25.6MB/s
Requirement already satisfied: pyaaf2==1.2.0 in d:\toolbox\blender-2.82a-windows64\2.82\python\lib\site-packages (fr
Installing collected packages: opentimelineio
  Running setup.py install for opentimelineio ... error
    Complete output from command D:\Toolbox\blender-2.82a-windows64\2.82\python\bin\python.exe -u -c "import setuptocs7_\\opentimelineio\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.clData\Local\Temp\pip-record-7p775ygc\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\opentimelineio
    copying src\py-opentimelineio\opentimelineio\exceptions.py -> build\lib.win-amd64-3.7\opentimelineio
    copying src\py-opentimelineio\opentimelineio\hooks.py -> build\lib.win-amd64-3.7\opentimelineio
    copying src\py-opentimelineio\opentimelineio\media_linker.py -> build\lib.win-amd64-3.7\opentimelineio
    copying src\py-opentimelineio\opentimelineio\opentime.py -> build\lib.win-amd64-3.7\opentimelineio
    copying src\py-opentimelineio\opentimelineio\test_utils.py -> build\lib.win-amd64-3.7\opentimelineio
    copying src\py-opentimelineio\opentimelineio\__init__.py -> build\lib.win-amd64-3.7\opentimelineio
    creating build\lib.win-amd64-3.7\opentimelineio\adapters
    copying src\py-opentimelineio\opentimelineio\adapters\adapter.py -> build\lib.win-amd64-3.7\opentimelineio\adapt
    copying src\py-opentimelineio\opentimelineio\adapters\cmx_3600.py -> build\lib.win-amd64-3.7\opentimelineio\adap
    copying src\py-opentimelineio\opentimelineio\adapters\fcp_xml.py -> build\lib.win-amd64-3.7\opentimelineio\adapt
    copying src\py-opentimelineio\opentimelineio\adapters\otio_json.py -> build\lib.win-amd64-3.7\opentimelineio\ada
    copying src\py-opentimelineio\opentimelineio\adapters\__init__.py -> build\lib.win-amd64-3.7\opentimelineio\adap
    creating build\lib.win-amd64-3.7\opentimelineio\algorithms
    copying src\py-opentimelineio\opentimelineio\algorithms\filter.py -> build\lib.win-amd64-3.7\opentimelineio\algo
    copying src\py-opentimelineio\opentimelineio\algorithms\stack_algo.py -> build\lib.win-amd64-3.7\opentimelineio\
    copying src\py-opentimelineio\opentimelineio\algorithms\timeline_algo.py -> build\lib.win-amd64-3.7\opentimeline
    copying src\py-opentimelineio\opentimelineio\algorithms\track_algo.py -> build\lib.win-amd64-3.7\opentimelineio\
    copying src\py-opentimelineio\opentimelineio\algorithms\__init__.py -> build\lib.win-amd64-3.7\opentimelineio\al
    creating build\lib.win-amd64-3.7\opentimelineio\console
    copying src\py-opentimelineio\opentimelineio\console\autogen_plugin_documentation.py -> build\lib.win-amd64-3.7\
    copying src\py-opentimelineio\opentimelineio\console\autogen_serialized_datamodel.py -> build\lib.win-amd64-3.7\
    copying src\py-opentimelineio\opentimelineio\console\console_utils.py -> build\lib.win-amd64-3.7\opentimelineio\
    copying src\py-opentimelineio\opentimelineio\console\otiocat.py -> build\lib.win-amd64-3.7\opentimelineio\consol
    copying src\py-opentimelineio\opentimelineio\console\otioconvert.py -> build\lib.win-amd64-3.7\opentimelineio\co
    copying src\py-opentimelineio\opentimelineio\console\otiopluginfo.py -> build\lib.win-amd64-3.7\opentimelineio\c
    copying src\py-opentimelineio\opentimelineio\console\otiostat.py -> build\lib.win-amd64-3.7\opentimelineio\conso
    copying src\py-opentimelineio\opentimelineio\console\__init__.py -> build\lib.win-amd64-3.7\opentimelineio\conso
    creating build\lib.win-amd64-3.7\opentimelineio\core
    copying src\py-opentimelineio\opentimelineio\core\composable.py -> build\lib.win-amd64-3.7\opentimelineio\core
    copying src\py-opentimelineio\opentimelineio\core\composition.py -> build\lib.win-amd64-3.7\opentimelineio\core
    copying src\py-opentimelineio\opentimelineio\core\item.py -> build\lib.win-amd64-3.7\opentimelineio\core
    copying src\py-opentimelineio\opentimelineio\core\mediaReference.py -> build\lib.win-amd64-3.7\opentimelineio\co
    copying src\py-opentimelineio\opentimelineio\core\_core_utils.py -> build\lib.win-amd64-3.7\opentimelineio\core
    copying src\py-opentimelineio\opentimelineio\core\__init__.py -> build\lib.win-amd64-3.7\opentimelineio\core
    creating build\lib.win-amd64-3.7\opentimelineio\plugins
    copying src\py-opentimelineio\opentimelineio\plugins\manifest.py -> build\lib.win-amd64-3.7\opentimelineio\plugi
    copying src\py-opentimelineio\opentimelineio\plugins\python_plugin.py -> build\lib.win-amd64-3.7\opentimelineio\
    copying src\py-opentimelineio\opentimelineio\plugins\__init__.py -> build\lib.win-amd64-3.7\opentimelineio\plugi
    creating build\lib.win-amd64-3.7\opentimelineio\schema
    copying src\py-opentimelineio\opentimelineio\schema\clip.py -> build\lib.win-amd64-3.7\opentimelineio\schema
    copying src\py-opentimelineio\opentimelineio\schema\effect.py -> build\lib.win-amd64-3.7\opentimelineio\schema
    copying src\py-opentimelineio\opentimelineio\schema\external_reference.py -> build\lib.win-amd64-3.7\opentimelin
    copying src\py-opentimelineio\opentimelineio\schema\foo.py -> build\lib.win-amd64-3.7\opentimelineio\schema
    copying src\py-opentimelineio\opentimelineio\schema\generator_reference.py -> build\lib.win-amd64-3.7\opentimeli
    copying src\py-opentimelineio\opentimelineio\schema\marker.py -> build\lib.win-amd64-3.7\opentimelineio\schema
    copying src\py-opentimelineio\opentimelineio\schema\schemadef.py -> build\lib.win-amd64-3.7\opentimelineio\schem
    copying src\py-opentimelineio\opentimelineio\schema\serializable_collection.py -> build\lib.win-amd64-3.7\openti
    copying src\py-opentimelineio\opentimelineio\schema\stack.py -> build\lib.win-amd64-3.7\opentimelineio\schema
    copying src\py-opentimelineio\opentimelineio\schema\timeline.py -> build\lib.win-amd64-3.7\opentimelineio\schema
    copying src\py-opentimelineio\opentimelineio\schema\track.py -> build\lib.win-amd64-3.7\opentimelineio\schema
    copying src\py-opentimelineio\opentimelineio\schema\transition.py -> build\lib.win-amd64-3.7\opentimelineio\sche
    copying src\py-opentimelineio\opentimelineio\schema\__init__.py -> build\lib.win-amd64-3.7\opentimelineio\schema
    creating build\lib.win-amd64-3.7\opentimelineio\schemadef
    copying src\py-opentimelineio\opentimelineio\schemadef\__init__.py -> build\lib.win-amd64-3.7\opentimelineio\sch
    creating build\lib.win-amd64-3.7\opentimelineview
    copying src\opentimelineview\console.py -> build\lib.win-amd64-3.7\opentimelineview
    copying src\opentimelineview\details_widget.py -> build\lib.win-amd64-3.7\opentimelineview
    copying src\opentimelineview\ruler_widget.py -> build\lib.win-amd64-3.7\opentimelineview
    copying src\opentimelineview\settings.py -> build\lib.win-amd64-3.7\opentimelineview
    copying src\opentimelineview\timeline_widget.py -> build\lib.win-amd64-3.7\opentimelineview
    copying src\opentimelineview\track_widgets.py -> build\lib.win-amd64-3.7\opentimelineview
    copying src\opentimelineview\__init__.py -> build\lib.win-amd64-3.7\opentimelineview
    creating build\lib.win-amd64-3.7\opentimelineio_contrib
    copying contrib\opentimelineio_contrib\__init__.py -> build\lib.win-amd64-3.7\opentimelineio_contrib
    creating build\lib.win-amd64-3.7\opentimelineio_contrib\adapters
    copying contrib\opentimelineio_contrib\adapters\advanced_authoring_format.py -> build\lib.win-amd64-3.7\opentime
    copying contrib\opentimelineio_contrib\adapters\ale.py -> build\lib.win-amd64-3.7\opentimelineio_contrib\adapter
    copying contrib\opentimelineio_contrib\adapters\burnins.py -> build\lib.win-amd64-3.7\opentimelineio_contrib\ada
    copying contrib\opentimelineio_contrib\adapters\extern_maya_sequencer.py -> build\lib.win-amd64-3.7\opentimeline
    copying contrib\opentimelineio_contrib\adapters\extern_rv.py -> build\lib.win-amd64-3.7\opentimelineio_contrib\a
    copying contrib\opentimelineio_contrib\adapters\fcpx_xml.py -> build\lib.win-amd64-3.7\opentimelineio_contrib\ad
    copying contrib\opentimelineio_contrib\adapters\ffmpeg_burnins.py -> build\lib.win-amd64-3.7\opentimelineio_cont
    copying contrib\opentimelineio_contrib\adapters\hls_playlist.py -> build\lib.win-amd64-3.7\opentimelineio_contri
    copying contrib\opentimelineio_contrib\adapters\kdenlive.py -> build\lib.win-amd64-3.7\opentimelineio_contrib\ad
    copying contrib\opentimelineio_contrib\adapters\maya_sequencer.py -> build\lib.win-amd64-3.7\opentimelineio_cont
    copying contrib\opentimelineio_contrib\adapters\rv.py -> build\lib.win-amd64-3.7\opentimelineio_contrib\adapters
    copying contrib\opentimelineio_contrib\adapters\xges.py -> build\lib.win-amd64-3.7\opentimelineio_contrib\adapte
    copying contrib\opentimelineio_contrib\adapters\__init__.py -> build\lib.win-amd64-3.7\opentimelineio_contrib\ad
    creating build\lib.win-amd64-3.7\opentimelineio_contrib\adapters\aaf_adapter
    copying contrib\opentimelineio_contrib\adapters\aaf_adapter\aaf_writer.py -> build\lib.win-amd64-3.7\opentimelin
    copying contrib\opentimelineio_contrib\adapters\aaf_adapter\__init__.py -> build\lib.win-amd64-3.7\opentimelinei
    running egg_info
    writing OpenTimelineIO.egg-info\PKG-INFO
    writing dependency_links to OpenTimelineIO.egg-info\dependency_links.txt
    writing entry points to OpenTimelineIO.egg-info\entry_points.txt
    writing requirements to OpenTimelineIO.egg-info\requires.txt
    writing top-level names to OpenTimelineIO.egg-info\top_level.txt
    reading manifest file 'OpenTimelineIO.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching 'CHANGELOG.md'
    no previously-included directories found matching 'docs'
    warning: no previously-included files found matching '.gitmodules'
    warning: no previously-included files matching '*.git' found under directory 'src'
    warning: no previously-included files found matching '.readthedocs.yml'
    warning: no previously-included files found matching 'readthedocs-conda.yml'
    warning: no previously-included files found matching '.codecov.yml'
    warning: no previously-included files found matching '.gitlab-ci.yml'
    warning: no previously-included files found matching '.travis.yml'
    warning: no previously-included files found matching '*.pdf'
    warning: no previously-included files found matching 'CODE_OF_CONDUCT.md'
    warning: no previously-included files found matching 'CONTRIBUTING.md'
    warning: no previously-included files found matching 'contrib\opentimelineio_contrib\adapters\Makefile'
    warning: no previously-included files found matching 'Makefile'
    no previously-included directories found matching 'contrib\opentimelineio_contrib\adapters\tests'
    no previously-included directories found matching 'tests'
    no previously-included directories found matching 'src\deps\pybind11\tools\clang'
    no previously-included directories found matching 'src\deps\rapidjson\thirdparty'
    writing manifest file 'OpenTimelineIO.egg-info\SOURCES.txt'
    copying src\py-opentimelineio\opentimelineio\adapters\builtin_adapters.plugin_manifest.json -> build\lib.win-amd
    creating build\lib.win-amd64-3.7\opentimelineio_contrib\application_plugins
    creating build\lib.win-amd64-3.7\opentimelineio_contrib\application_plugins\rv
    creating build\lib.win-amd64-3.7\opentimelineio_contrib\application_plugins\rv\example_otio_reader
    copying contrib\opentimelineio_contrib\application_plugins\rv\example_otio_reader\PACKAGE -> build\lib.win-amd64
    copying contrib\opentimelineio_contrib\application_plugins\rv\example_otio_reader\example_otio_reader_plugin.py _otio_reader
    copying contrib\opentimelineio_contrib\application_plugins\rv\example_otio_reader\otio_reader.py -> build\lib.wi
    copying contrib\opentimelineio_contrib\adapters\contrib_adapters.plugin_manifest.json -> build\lib.win-amd64-3.7
    copying contrib\opentimelineio_contrib\adapters\ffmpeg_burnins.pyc -> build\lib.win-amd64-3.7\opentimelineio_con
    running build_ext
    -- Building for: Visual Studio 16 2019
    -- The C compiler identification is MSVC 19.23.28106.4
    -- The CXX compiler identification is MSVC 19.23.28106.4
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/1
    -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/1
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    fatal: not a git repository (or any of the parent directories): .git
    -- Found PythonInterp: D:/Toolbox/blender-2.82a-windows64/2.82/python/bin/python.exe (found version "3.7.4")
    CMake Error at src/deps/pybind11/tools/FindPythonLibsNew.cmake:158 (message):
      Python libraries not found
    Call Stack (most recent call first):
      src/deps/pybind11/tools/pybind11Tools.cmake:16 (find_package)
      src/deps/pybind11/CMakeLists.txt:33 (include)

    -- Configuring incomplete, errors occurred!
    See also "C:/Users/laure/AppData/Local/Temp/pip-install-9smecs7_/opentimelineio/build/temp.win-amd64-3.7/Release
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\laure\AppData\Local\Temp\pip-install-9smecs7_\opentimelineio\setup.py", line 466, in <module>
        **PROJECT_METADATA
      File "D:\Toolbox\blender-2.82a-windows64\2.82\python\lib\site-packages\setuptools\__init__.py", line 145, in s
        return distutils.core.setup(**attrs)
      File "D:\Toolbox\blender-2.82a-windows64\2.82\python\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "D:\Toolbox\blender-2.82a-windows64\2.82\python\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "D:\Toolbox\blender-2.82a-windows64\2.82\python\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\laure\AppData\Local\Temp\pip-install-9smecs7_\opentimelineio\setup.py", line 140, in run
        install.run(self)
      File "D:\Toolbox\blender-2.82a-windows64\2.82\python\lib\site-packages\setuptools\command\install.py", line 61
        return orig.install.run(self)
      File "D:\Toolbox\blender-2.82a-windows64\2.82\python\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "D:\Toolbox\blender-2.82a-windows64\2.82\python\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "D:\Toolbox\blender-2.82a-windows64\2.82\python\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "D:\Toolbox\blender-2.82a-windows64\2.82\python\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "D:\Toolbox\blender-2.82a-windows64\2.82\python\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "D:\Toolbox\blender-2.82a-windows64\2.82\python\lib\distutils\dist.py", line 985, in run_command
\\blender-2.82a-windows64\\2.82\\python\\bin\\python.exe', '-DOTIO_PYTHON_INSTALL:BOOL=ON', '-DOTIO_PYTHON_OTIO_DIR=C:\\Users\\laure\\AppData\\Local\\Temp\\pip-install-9smecs7_\\opentimelineio\\build\\lib.win-amd64-3.7\\opentimelineio\\', '-DCMAKE_INSTALL_PREFIX=D:\\Toolbox\\blender-2.82a-windows64\\2.82\\python\\Lib\\site-packages\\opentimelineio\\cxx-libs', '-DOTIO_CXX_NOINSTALL:BOOL=ON', '-A', 'x64']' returned non-zero exit status 1.

    ----------------------------------------
Command "D:\Toolbox\blender-2.82a-windows64\2.82\python\bin\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\laure\\AppData\\Local\\Temp\\pip-install-9smecs7_\\opentimelineio\\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\laure\AppData\Local\Temp\pip-record-7p775ygc\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\laure\AppData\Local\Temp\pip-install-9smecs7_\opentimelineio\
ssteinbach commented 4 years ago

@Celeborn2BeAlive is this similar to this issue? #667 i think that was also in regards to blender.

Celeborn2BeAlive commented 4 years ago

@ssteinbach Yes it is ! Didn't notice it was related to Blender (I only have read the post mentionning the dll issue). They also discuss the fact that otio can be installed from a wheel in Blender, so I guess the only thing missing for it to work out of the box with "pip install" is for someone having the rights to upload the wheel on pipy. It could also help people that don't have a C/C++ build env on their computer but still want to use otio from python on Windows.

ssteinbach commented 4 years ago

I think that thread has some instructions for how to make it work... I'm going to close this issue as a duplicate unless there is something else I missed in this one! Thanks!

Celeborn2BeAlive commented 4 years ago

But do you plan to upload the wheel to pipy at some point ?

ssteinbach commented 2 years ago

Starting with v0.14, OTIO will have wheels for mac/win/linux, but we do not plan to go back and upload wheels for all platforms for older versions.