简体   繁体   中英

Python Selenium noarch RPM build failure

Attempting to build Python Selenium noarch rpm from downloaded selenium-2.20.0.tar.gz All necessary Python requirements are installed and working, using command:

python setup.py bdist --format=rpm

RPMBuild fails with error message:

Arch dependent binaries in noarch package
error: command 'rpmbuild' failed with exit status 1

Have tried following the suggestion of adding an additiional %define to the selenium.SPEC file, found under build/bdist.linux-i686/rpm/SPECS/selenium.spec

%define _binaries_in_noarch_packages_terminate_build 0

Unfortunately when i re-run the RPM build, the change is not picked up and the contents of the SPEC file after the build seem to have re-verted as the newly added %define is no longer present?!

Any suggestions welcome please..

Changes to selenium.spec weren't persisting as the spec file is automatically generated from content mostly from within setup.py

Two solutions were found:

1) Download most recent version of selenium-2.20.0.tar.gz from http://pypi.python.org/pypi/selenium/ to target machine, tar extract and run:

python setup.py install

2) Install python pip, then use pip to dowload and install the latest selenium in an automated fashion with the command:

pip install -U selenium

As yet i have not found the exact content that can be added to setup.py that will add the necessary RPM build define to the selenium.spec file for creating an installation RPM..

For the future if anyone comes across this

python setup.py bdist_rpm --force-arch x86_64

Worked for me

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM