Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge commit '2612990e0581c7fb1a3c1932fd4df9c6a246f928'

Conflicts:
	rpm-install-script.sh
  • Loading branch information...
commit cbaf9fe7ec49b3d85df2f216cac65f31f6b05c25 2 parents 3a66f05 + 2612990
Mateus Caruccio authored
Showing with 30 additions and 2 deletions.
  1. +1 −1  rpm-install-script.sh
  2. +29 −1 setup.py
View
2  rpm-install-script.sh
@@ -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
View
30 setup.py
@@ -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"
@@ -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',
Please sign in to comment.
Something went wrong with that request. Please try again.