Konstantin Maslyuk Posted February 20, 2020 Report Share Posted February 20, 2020 Hello, please add support for "build_ext" command in your setup.py for following packages: ftrack-connect, ftrack-connect-pipeline and (probably) qtext. "python setup.py develop" does not call "build" instead it call "build_ext" so i'm getting not working packages installed. This is important when i use third party tools like Poetry, that create virtual env and install path and url-provided dependencies in development mode. My root problem is that ftrack-connect is not building at moment as it tries to install "Jinja2 3.0.1a" that is not py2 compatible. Link to comment Share on other sites More sharing options...
Lorenzo Angeli Posted February 20, 2020 Report Share Posted February 20, 2020 Hi @Konstantin Maslyuk, this is something I need to double check as I usually go for using pip to install dev versions with : pip install -e <path to repo> regarding connect there's a branch I'm looking into these days similar to your request:https://bitbucket.org/ftrack/ftrack-connect/branch/backlog/review-standalone-install try to give it a go and let me know. Cheers. L. p.s Jinja 3 is not a requirement of ours, is likely coming as sub dependency of sphinx or something similar. if you have a chance to pin down the offending module version let me know. Link to comment Share on other sites More sharing options...
Konstantin Maslyuk Posted February 21, 2020 Author Report Share Posted February 21, 2020 I ask you to add "python setup.py build_ext" command that will execute same command class as build command. This way one will got working package installed in development mode, so less confusion for newcomers and resolve problems with third party tools (poetry in my case). According to setuptools documentation "build_ext" is executed during "develop". The issue with dependencies is something i still investigating, i had attached log, its docker/python:2, but i had such issue on fresh windows host. Some other (not so fresh) environments i have access to resolve dependencies successfully. And attached attempt to install from that branch. jinja2.txt review-standalone-installer.txt Link to comment Share on other sites More sharing options...
Konstantin Maslyuk Posted February 21, 2020 Author Report Share Posted February 21, 2020 When i attempt to install QtExt0.2.2 i had same error with Jinja2 3.0.0a1, but "pip install Jinja2" resolve it to 2.11.1. The rest is fine, i used docker/ubuntu:18.04. Link to comment Share on other sites More sharing options...
Konstantin Maslyuk Posted February 21, 2020 Author Report Share Posted February 21, 2020 By the way is it possible to switch to PySide2, PySide1 is not easy to obtain nowdays. There is not wheel for windows and linux, debian:buster does not provide deb package for that under py2. I will test and let you know. Link to comment Share on other sites More sharing options...
Konstantin Maslyuk Posted February 22, 2020 Author Report Share Posted February 22, 2020 Sorry, it look like there is no PySide2-cp27-win32 wheel at all. But i cant realize why i encounter extension building for PySide sometimes... It look like a mess but i have no concrete suggestions but "build_ext" command. Link to comment Share on other sites More sharing options...
Konstantin Maslyuk Posted February 22, 2020 Author Report Share Posted February 22, 2020 Sorry, it look like there is no PySide2-cp27-win32 wheel at all. I cant realize why i encounter extension building for PySide sometimes... It look like a mess but i have no concrete suggestions but "build_ext" command. Link to comment Share on other sites More sharing options...
Lorenzo Angeli Posted February 24, 2020 Report Share Posted February 24, 2020 Hi @Konstantin Maslyuk although not tested, connect should be able to support pyside2 though our QtExt layer, but has not been reviewed for supporting Python 3k atm. I'll be double checking the build_ext functionality in the above branch, keep monitoring it. > The rest is fine, i used docker/ubuntu:18.04. connect is currently tested and built for centos 7 , I've not much of an experience on Ubuntu, so not sure what packages are available and to what version. for this error: > distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('qtext') please try to downgrade your pip to version 19.3 and try again. Let us know how it goes. Cheers. L. Link to comment Share on other sites More sharing options...
Lorenzo Angeli Posted February 25, 2020 Report Share Posted February 25, 2020 Hi @Konstantin Maslyuk I've just been pushing a new commit on the above PR to ensure you can install qtext in build_ext command. Please pull again and give it a go. let us know how it goes. L. Link to comment Share on other sites More sharing options...
Konstantin Maslyuk Posted February 25, 2020 Author Report Share Posted February 25, 2020 I had installed ftrack_connect without any issue (but i still have a lot of wheels in pip's cache on my windows host) Although i expected implementation of build_ext command so i may not encounter ImportError for resource module when installing in development mode. First time i encountered that error i decided that it is a bug. If i: diff --git a/setup.py b/setup.py index 39990d9..fbaf6b5 100644 --- a/setup.py +++ b/setup.py @@ -261,2 +261,3 @@ configuration = dict( 'build': Build, + 'build_ext': Build, 'build_resources': BuildResources, Then "pip install -e ./ftrack-connect && python -m ftrack_connect" does not produce an error. It may be proper to implementing resources as setuptools.Extension - i don't know. build_ext.txt Link to comment Share on other sites More sharing options...
Konstantin Maslyuk Posted February 25, 2020 Author Report Share Posted February 25, 2020 And when i attempted to do a clean install inside docker, i got following: with pip==19.3,20 docker-centos7.txt Link to comment Share on other sites More sharing options...
Lorenzo Angeli Posted February 26, 2020 Report Share Posted February 26, 2020 @Konstantin Maslyuk I've now made so calling build_ext use the same command as Build hence building the missing resource.py, hope this ease your problem. This is what I'm doing for testing create a new virtualenv (I personally use mkvirtualenv wrapper) activate virtualenv go with the shell in the ftrack-connect repo folder and checkout the given branch (and pull) run to install in editable mode : pip install -e . run ftrack-connect : ftrack-connect here the versions of the basic moving parts I'm using: python : 2.7.14 setuptools : 44.0.0 pip: 19.3 (20 works too) Let us know how it goes. L. p.s should work in docker too, could you share your dockerfile so I can check ? Link to comment Share on other sites More sharing options...
Konstantin Maslyuk Posted February 27, 2020 Author Report Share Posted February 27, 2020 i finally got it working in docker with following Dockerfile Dockerfile Link to comment Share on other sites More sharing options...
Konstantin Maslyuk Posted February 27, 2020 Author Report Share Posted February 27, 2020 poetry also install and run with ftrack-connect from that branch well. i knew that pip isn't robust, but case with Jinja2 3.0.0a1 was first case i encountered. Maybe there was incorrectly published package that i got into my pip cache and it was broke my installations a couple of weeks. Link to comment Share on other sites More sharing options...
Lorenzo Angeli Posted February 28, 2020 Report Share Posted February 28, 2020 Glad to hear @Konstantin Maslyuk ! The branch still requires some tweaks and details, but should soon get to master. More news and info on the branch itself L. Konstantin Maslyuk 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now