Closed GoogleCodeExporter closed 9 years ago
Created cefpython3 page: https://pypi.python.org/pypi/cefpython3
Original comment by czarek.t...@gmail.com
on 1 Dec 2014 at 7:11
Using command "sudo pip install cefpython3" probably won't work currently.
Because there are multiple binary files provided for both Windows/Linux. A
solution may be to use Python egg distribution:
"python setup.py bdist_egg" is the command produces a Python egg distribution. This
records the Python version and platform. You need to be using setuptools instead of
distutils for that command to be available.
See for reference:
http://stackoverflow.com/questions/20830698/how-to-get-pypi-to-recognise-the-os-
correctly
Original comment by czarek.t...@gmail.com
on 1 Dec 2014 at 8:13
Uploading linux distutils setup.py binaries worked only after packing it using
TAR GZIP (in 7-zip first pack it to tar, then again and only then GZIP option
will appear). Otherwise error occured "invalid distribution file" for both .zip
and .7z extensions.
Original comment by czarek.t...@gmail.com
on 1 Dec 2014 at 8:44
Uploading Inno Setup installer fails with "invalid distribution file" (selected
MS Windows installer).
Original comment by czarek.t...@gmail.com
on 1 Dec 2014 at 9:00
Uploaded files on PyPI are sorted by name. You can't change the order by
changing upload sequence. So when "pip install cefpython3" is issued it will
probably get the first one, which is Linux 32-bit binaries.
Original comment by czarek.t...@gmail.com
on 1 Dec 2014 at 9:13
[deleted comment]
See Python Packaging User Guide for more options beside Python eggs:
https://packaging.python.org/en/latest/
https://packaging.python.org/en/latest/projects.html
Python Wheel:
https://wheel.readthedocs.org/en/latest/
Worth considering using "setuptools" instead of "distutils":
https://pythonhosted.org/setuptools/
Original comment by czarek.t...@gmail.com
on 1 Dec 2014 at 12:28
When installing on Windows pip downloads linux 64bit binaries:
C:\Users\ctomczak>pip install cefpython3
Downloading/unpacking cefpython3
Downloading cefpython3-31.0-linux64-setup.tar.gz (37.5Mb): 37.5Mb downloaded
Running setup.py egg_info for package cefpython3
Original comment by czarek.t...@gmail.com
on 1 Dec 2014 at 12:36
After upgrading pip from 1.0.2 to 1.5.6 it starts recognizing files a bit
better in regards to platform. See logs from pip 1.5.6:
C:\Users\ctomczak>pip install cefpython3
Downloading/unpacking cefpython3
Could not find a version that satisfies the requirement cefpython3 (from versions: 31.0-linux32-setup, 31.0-linux64-setup)
Cleaning up...
No distributions matching the version for cefpython3
Original comment by czarek.t...@gmail.com
on 1 Dec 2014 at 12:40
Uploading win32.tar.gz didn't help, still the same error.
Found this:
http://stackoverflow.com/questions/18230956/could-not-find-a-version-that-satisf
ies-the-requirement-pytz
Starting with v1.4, pip will only install stable versions as specified by
PEP426 by default. If a version cannot be parsed as a compliant PEP426
version then it is assumed to be a pre-release.
So I've tried running "pip install --pre cefpython3", but now another error:
C:\Users\ctomczak>pip install --pre cefpython3
Downloading/unpacking cefpython3
Running setup.py (path:c:\users\ctomczak\appdata\local\temp\pip_build_ctomczak\cefpython3\setup.py)
egg_info for package cefpython3
Installing collected packages: cefpython3
Running setup.py install for cefpython3
..
error: option --single-version-externally-managed not recognized
Googled this error as well and some suggested that old version of "setuptools"
may be causing this, so I've updated setuptools using "pip install setuptools
--upgrade". But it didn't help, still the same error.
Maybe it is required that setup.py uses "setuptools" instead of "distutils" for
that option to work? That would require modifying Windows and Linux installers
and lots of further testing. Looks like it would be easier to create an egg
installer.
There is still question why does it detect
"cefpython3-31.0.win32-py2.7-setup.tar.gz" as a PRE release? Is the naming
wrong?
Original comment by czarek.t...@gmail.com
on 1 Dec 2014 at 1:13
Python Egg should contain information on platform (win32, win-amd64,
linux2-i386, linux2-amd64, for Py3: linux-i386, linux-amd64). You can fetch
this using:
import sysconfig
sysconfig.get_platform()
To embed platform information use setup(.., platforms=['win32'], ..).
Unfortunately when running "python setup.py bdist_egg" the egg created is named:
cefpython3-31.0-py2.7.egg
We should probably change it to ".win32.egg", so that multiple eggs for various
platforms may be uploaded to PyPI. Allowed names for exe are (found in
setuptools):
.win32.exe
.win32-py
.win-amd64.exe
.win-amd64-py
Examples from PyPI:
pymongo-2.7.2.win-amd64-py2.7.exe
pymongo-2.7.2.win32-py2.7.exe
lxml-2.3.win-amd64-py2.7.exe
lxml-2.3.win32-py2.7.exe
pymongo-2.7.2-py2.7-win32.egg
pymongo-2.7.2-py2.7-win-amd64.egg
lxml-2.3-py2.7-win-amd64.egg
lxml-2.3-py2.7-win32.egg
For references see:
https://pypi.python.org/pypi/pymongo/
https://pypi.python.org/pypi/lxml/2.3
https://pypi.python.org/pypi/ibm_db
Original comment by czarek.t...@gmail.com
on 1 Dec 2014 at 2:15
Adding --plat-name=PLATFORM or -p PLATFORM flags to bdist_egg does not help.
Egg file name still has no platform in it.
Original comment by czarek.t...@gmail.com
on 1 Dec 2014 at 2:21
Added support for Python eggs in revision c6ff43c19492.
Original comment by czarek.t...@gmail.com
on 1 Dec 2014 at 2:43
It turns out that PIP tool doesn't support Python Eggs. To install egg use
easy_install:
easy_install cefpython3
Unfortunately easy_install doesn't support uninstalling packages. PIP supports
uninstalling.
To install using PIP we need to provide Python Wheel files (.whl) on PyPI. To
create .whl file do:
pip install wheel
python setup.py bdist_wheel
On Linux 64-bit sysconfig.get_platform() returns "linux-x86_64".
Original comment by czarek.t...@gmail.com
on 1 Dec 2014 at 3:25
Before .egg and .whl can be created for Linux we need to resolve Issue 145:
"Linux installers: setup.py and .deb package issues - dependencies and
libudev.so.0".
Original comment by czarek.t...@gmail.com
on 1 Dec 2014 at 3:28
Note that when creating Python Wheel my_post_install() is executed.
Original comment by czarek.t...@gmail.com
on 1 Dec 2014 at 4:19
Python Wheels are now working. Uploaded .whl to PyPI and installed using "pip
install cefpython3" without problems. Uninstall worked as well. A minor fix was
required, see revision 378141c21645.
Still need to create .egg/.whl files on Linux when Issue 145 is fixed.
Original comment by czarek.t...@gmail.com
on 1 Dec 2014 at 4:30
Another fix for Python Wheels in revision 688f00124efe.
Original comment by czarek.t...@gmail.com
on 1 Dec 2014 at 4:44
Python Eggs don't support post install mechanism
(http://bugs.python.org/setuptools/issue41). So for Linux .egg is not an option
on PyPI. Execute permissions need to be set in a post-install script, and a
libudev symlink needs to be created as well.
Original comment by czarek.t...@gmail.com
on 3 Dec 2014 at 6:50
Python Wheels also don't support post install mechanism. On the plus execute
permissions on files are set fine without postinstall. However libudev issue
still persists.
When CEFPython upgrades to Chrome 41 libudev issue will be finally resolved,
see:
https://code.google.com/p/cefpython/issues/detail?id=105#c6
When that happens we will provide .whl distributions on PyPI. For now try to
upload debian packages.
Original comment by czarek.t...@gmail.com
on 3 Dec 2014 at 7:18
Looks like another bug with Python Wheel. File for distribution is named
"cefpython3-31.1-cp27-none-linux_x86_64.whl". But when uploading on PyPI error
occurs:
Binary wheel for an unsupported platform.
Looks like Python Wheel has issues with platform identifier. It should probably
be "linux-x86_64.whl", so that it is recognized properly. On PyPI pymongo/lxml
I don't see distributions for Linux 64bit.
Renaming file probably won't resolve issue, as "linux_x86_64" is also embedded
in meta data files and most probably this will cause issues as well.
Original comment by czarek.t...@gmail.com
on 3 Dec 2014 at 7:23
It's not possible to upload .deb package. PyPI says that file name must start
with "cefpython3", but in case of a deb package it is "python-cefpython3".
Original comment by czarek.t...@gmail.com
on 3 Dec 2014 at 7:27
There will be no packages for Linux on PyPI, as there is no way to run
post-install script to fix libudev dependency. When cefpython updates to Chrome
41 and libudev is fixed then we might reconsider creating a Wheel package for
Linux. However it still won't be able to install libcef.so / libffmpegsumo.so /
pdf.so dependencies. Debian package can do that.
Original comment by czarek.t...@gmail.com
on 4 Dec 2014 at 7:38
Original issue reported on code.google.com by
czarek.t...@gmail.com
on 1 Dec 2014 at 6:21