Skip to content

Instantly share code, notes, and snippets.

@praveenkumar
Created July 11, 2014 04:31
Show Gist options
  • Select an option

  • Save praveenkumar/ad861075a7d63d7a8e4b to your computer and use it in GitHub Desktop.

Select an option

Save praveenkumar/ad861075a7d63d7a8e4b to your computer and use it in GitHub Desktop.
Creating rpm-python tarball from rpm source
# 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