Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add spec file and Makefile to build RPMs #40

Closed
wants to merge 2 commits into from
Closed

add spec file and Makefile to build RPMs #40

wants to merge 2 commits into from

Conversation

atodorov
Copy link

@atodorov atodorov commented Jun 8, 2012

Hi,
here's a .spec file and a Makefile to help build RPMs for those like me, who don't like to install from PyPI directly.

In the PWD ensure you have the django-ses-$VERSION.tar.gz file and run make rpm. The resulting RPMs will be in the current directory.

I've tested the resulting RPM on RHEL6 and it appears to be working correctly.

NOTE: Since latest stable is 0.4.1 and setup.py in Git is at 0.5.0 you have to either edit setup.py to match the version of the tarball or checkout 0.4.1 from git.

NOTE2: This is unrelated but is visible while doing the packaging. The example/ directory is installed under /usr/lib/python-x.y/site-packages/example which is very likely to conflict with other packages. In the RPM I place it under /usr/share/doc/django-ses-x.y/example but can't remove it from the Python site-packages dir. setup.py needs a patch to handle this properly.

@tswicegood
Copy link
Contributor

I like this in theory, but it needs to follow the same file inclusion that python setup.py sdist would generate. Would you be interested in updating this to handle that?

(sorry for the late response, working through a huge backlog of PRs on some open-source projects)

@atodorov
Copy link
Author

This should be fixed now. Current Name/Version are pulled from setup.py and Makefile makes sure to call setup.py sdist if the tarball is not already present. To build simply execute make rpm and it will build a Python source distribution as well as RPM package.

I've also updated the clean/distclean targets. You will probably want to add more stugg to .gitignore as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants