Created
July 11, 2014 04:31
-
-
Save praveenkumar/ad861075a7d63d7a8e4b to your computer and use it in GitHub Desktop.
Creating rpm-python tarball from rpm source
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install devel library | |
| yum install rpm-devel | |
| # Download available srpm (using f20 srpm) | |
| wget https://kojipkgs.fedoraproject.org//packages/rpm/4.11.2/1.fc20/src/rpm-4.11.2-1.fc20.src.rpm | |
| # Extract SRPM | |
| rpm -Uvh <SRPM> | |
| # Install rpm dependencies | |
| yum-builddeb <SPEC file Location> | |
| # Compile rpm SOURCE | |
| rpmbuild -bc <SPEC file> | |
| # Create rpm-python tarball (MANIFEST will be auto-generated) | |
| cd <rpmbuild_location>/BUILD/python | |
| python setup.py sdist | |
| # Recreate tarball which include required header | |
| mv MANIFEST MANIFEST.in | |
| # add "include *.h" top of MANIFEST.in and re-generate tarball | |
| python setup.py sdist | |
| # Check created tarball is install-able with pip | |
| pip install <rpm-python_tarball> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment