Jump to content


Installing p4python on Fedora Core 29


  • Please log in to reply
4 replies to this topic

#1 PompeyPaul

PompeyPaul

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 12 March 2019 - 09:31 PM

I have an issue trying to install p4python on FC29 x64 server:

root@localhost ~]# pip install p4python
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip install --user` instead.
Collecting p4python
  Using cached https://files.pythonhosted.org/packages/36/5a/0a1b192cdecd31cb8bc0d0ba39c73ffd84ce823053d0004823a1fdbe1440/p4python-2018.2.1743033.tar.gz
	Complete output from command python setup.py egg_info:
	****************************************************
	Cannot match OpenSSL Version string 'OpenSSL 1.1.1b FIPS  26 Feb 2019
	'
	****************************************************
	***********************************************
	** Cannot build P4Python without SSL support **
	***********************************************
	Attempting to load API from ftp.perforce.com
	Loaded API into /tmp/p4api-2018.2.1751184

I had this a month or so ago, and went back to FC28. Is there anyway of getting p4python to work on vanilla FC29?

#2 PompeyPaul

PompeyPaul

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 13 March 2019 - 01:11 AM

I now have a working recipe to get this to work on Fedora Core 29. It's late, and I didn't capture the script but it works like this:

1. Install the compat-openssl package + compat-openssl-devel (dnf install compat-openssl compat-openssl-devel)
2. Compile P4Python from source: download from ftp://ftp.perforce.com/perforce/r18.2/bin.tools/p4python.tgz
3. unpack with tar xvf p4python.tgz
4. Check that it builds, pointing at the compat-openssl lib:  python setup.py build --ssl /usr/lib64
5. On FC29 I had to dnf install gcc gcc-c++ redhat-rpm-config python-devel to get it to build
6. Then install the module with  python setup.py install --ssl /usr/lib64
7. When it builds & installs check by going into python that you can now access P4 (import it)

This gets a working p4python install with latest FC29

#3 jaess

jaess

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 04 April 2019 - 07:51 PM

Unfortunately your solution no longer works in Fedora 29.  Also, using compat-openssl isn't a great solution since it replaces the built in openssl packages and may break lots of things.

It would be a lot better if perforce would release a version that works with the current release of OpenSSL.

#4 g_m_o_n_e_y

g_m_o_n_e_y

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 10 April 2019 - 07:17 PM

It appears that this version of openssl doesn't fit your regex in setup.py.
Looking around I found https://swarm.worksh...python/setup.py which has a regex of

Quote

OpenSSL (\d)\.(\d)\.(\d)(\S+)\s+\d+ \S+ \d+
but our openssl version returned from

Quote

openssl version
is

Quote

OpenSSL 1.1.1b FIPS  26 Feb 2019

Note that there is now a space between the 1.1.1b and FIPS. The regex needs to be updated to something more like

Quote

OpenSSL (\d)\.(\d)\.(\d)(\S+\s?\S*)\s+\d+ \S+ \d+

Which you can see in action here http://www.pyregex.c...iBGZWIgMjAxOSJ9

Can someone please update the setup.py and reload the source tar.gz to pypi? Please ;)

#5 g_m_o_n_e_y

g_m_o_n_e_y

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 11 April 2019 - 03:08 PM

``




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users