kennethreitz / records

SQL for Humans™
https://pypi.python.org/pypi/records/
ISC License
7.15k stars 570 forks source link

How to add compiled package to Pipfile? #155

Closed atlednolispe closed 5 years ago

atlednolispe commented 6 years ago
OS: macOS 10.13.4
Python: Python3.6.5

I want to install PyQt4, but it was updated to PyQt5, I can't install it by pipenv install

$ pipenv install PyQt4

Creating a virtualenv for this project…
Using /usr/local/opt/python/bin/python3.6 (3.6.5) to create virtualenv…
⠋Already using interpreter /usr/local/opt/python/bin/python3.6
Using base prefix '/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/atlednolispe/.local/share/virtualenvs/test-wHSmLS5U/bin/python3.6
Also creating executable in /Users/atlednolispe/.local/share/virtualenvs/test-wHSmLS5U/bin/python
Installing setuptools, pip, wheel...done.

Virtualenv location: /Users/atlednolispe/.local/share/virtualenvs/test-wHSmLS5U
Creating a Pipfile for this project…
Installing PyQt4…
Collecting PyQt4

Error:  An error occurred while installing PyQt4!
  Could not find a version that satisfies the requirement PyQt4 (from versions: )
No matching distribution found for PyQt4

Then i install it by downloading code from PyQt4 and successfully installed by make

$ pipenv run python configure.py
$ pipenv run make && make install

However, PyQt4 doesn't show in my Pipfile,

$ cat Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
requests = "*"
lxml = "*"
sip = "*"

[dev-packages]
ipdb = "*"

[requires]
python_version = "3.6"

$ python -m IPython
Python 3.6.5 (default, May 20 2018, 16:21:47)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from PyQt4 import QtCore

In [2]: QtCore
Out[2]: <module 'PyQt4.QtCore' from '/Users/atlednolispe/.local/share/virtualenvs/python_requests-b4G3Dfws/lib/python3.6/site-packages/PyQt4/QtCore.so'>

How can i solve it? Thanks!