Skip to content

Commit

Permalink
Merge commit '2612990e0581c7fb1a3c1932fd4df9c6a246f928'
Browse files Browse the repository at this point in the history
Conflicts:
	rpm-install-script.sh
  • Loading branch information
Mateus Caruccio committed Apr 23, 2012
2 parents 3a66f05 + 2612990 commit cbaf9fe
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rpm-install-script.sh
Expand Up @@ -2,4 +2,4 @@
# This is a workaround until someone comes with a better fix, like avoiding
# /usr/lib/rpm/brp-python-bytecompile to run or convincing people that CentOS is pure evil.

python setup.py install -O1 --single-version-externally-managed --root="$RPM_BUILD_ROOT" --record=INSTALLED_FILES
python setup.py install -O1 --single-version-externally-managed --root="$RPM_BUILD_ROOT" --record=INSTALLED_FILES
30 changes: 29 additions & 1 deletion setup.py
Expand Up @@ -35,6 +35,34 @@
5. A method to map an existing class to a Cassandra column family
"""

class rpm(Command):

description = "builds a RPM package"

user_options = []

def initialize_options(self):
pass

def finalize_options(self):
pass

def run(self):
if has_subprocess:
status = subprocess.call(["python", "setup.py", "bdist_rpm", "--install-script", "rpm-install-script.sh"])

if status:
raise RuntimeError("RPM build failed")

print ""
print "RPM built"
else:
print """
`setup.py rpm` is not supported for this version of Python.
Please ask in the user forums for help.
"""

class doc(Command):

description = "generate or test documentation"
Expand Down Expand Up @@ -101,7 +129,7 @@ def run(self):
install_requires = ['thrift'],
py_modules=['ez_setup'],
scripts=['pycassaShell'],
cmdclass={"doc": doc},
cmdclass={"doc": doc, "rpm": rpm},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
Expand Down

0 comments on commit cbaf9fe

Please sign in to comment.