Skip to content

Conversation

@anth2o
Copy link

@anth2o anth2o commented Jan 9, 2022

Hello,
I have an issue when trying to install your package:

python3 -m pip install git+https://github.com/QuantumPhotonicsLab/readPTU.git
Collecting git+https://github.com/QuantumPhotonicsLab/readPTU.git
  Cloning https://github.com/QuantumPhotonicsLab/readPTU.git to /private/var/folders/r7/wn2zm4pd5g137j4wf12279k80000gn/T/pip-req-build-l2m3kdor
  Running command git clone -q https://github.com/QuantumPhotonicsLab/readPTU.git /private/var/folders/r7/wn2zm4pd5g137j4wf12279k80000gn/T/pip-req-build-l2m3kdor
    ERROR: Command errored out with exit status 1:
     command: /Users/antoine/movexplo/env/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/r7/wn2zm4pd5g137j4wf12279k80000gn/T/pip-req-build-l2m3kdor/setup.py'"'"'; __file__='"'"'/private/var/folders/r7/wn2zm4pd5g137j4wf12279k80000gn/T/pip-req-build-l2m3kdor/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/r7/wn2zm4pd5g137j4wf12279k80000gn/T/pip-req-build-l2m3kdor/pip-egg-info
         cwd: /private/var/folders/r7/wn2zm4pd5g137j4wf12279k80000gn/T/pip-req-build-l2m3kdor/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/r7/wn2zm4pd5g137j4wf12279k80000gn/T/pip-req-build-l2m3kdor/setup.py", line 4, in <module>
        from cffi import FFI
    ModuleNotFoundError: No module named 'cffi'
    ----------------------------------------

This PR should solve this by moving the import in the Builder. I made sure my solution worked by executing pip install . without cffi already installed

I also modified the setup.py to move the compile operations from the install to the build step, so that pip install . also works.

- Move import to FFI directly in Builder
- Add matplotlib as a requirement
- Complile library in the build step so that `pip install .` also works
@anth2o anth2o force-pushed the fix-install-missing-cffi branch from a911c08 to f946f79 Compare January 10, 2022 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant