From d3708e1e79ee3aa976644ef00106f46835d28a54 Mon Sep 17 00:00:00 2001 From: James Kasten Date: Wed, 19 Nov 2014 02:28:09 +0000 Subject: [PATCH] Remove trustify/attic related code from setup.py Conflicts: .gitignore setup.py --- .gitignore | 1 - setup.py | 69 +++--------------------------------------------------- 2 files changed, 3 insertions(+), 67 deletions(-) diff --git a/.gitignore b/.gitignore index e998b5d04..77a795fa0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ *.pyc -trustify/protocol/chocolate_pb2.py m3 diff --git a/setup.py b/setup.py index 1e4f881b4..9d46ebea2 100755 --- a/setup.py +++ b/setup.py @@ -1,73 +1,15 @@ #!/usr/bin/env python - from setuptools import setup -from setuptools.command.build_py import build_py -from setuptools import Command -from distutils.errors import DistutilsPlatformError -import os -import subprocess -from distutils.spawn import find_executable - -proto = [ 'trustify/protocol/chocolate.proto' ] - -class build_py_with_protobuf(build_py): - protoc = find_executable("protoc") - - def run_protoc(self, proto): - try: - proc = subprocess.Popen( - [self.protoc, '--python_out', '.', proto], - stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - except OSError, ex: - if ex.errno == errno.ENOENT: - print ("Could not find protoc command. Make sure protobuf is " - "installed and your PATH environment is set.") - raise DistutilsPlatformError("Failed to generate protbuf " - "files with protoc.") - else: - raise - out = proc.communicate()[0] - result = proc.wait() - if result != 0: - print "Error during protobuf files generation with protoc:" - print out - raise DistutilsPlatformError("Failed to generate protobuf " - "files with protoc.") - - def run(self): - for p in proto: - self.run_protoc(p) - - build_py.run(self) - -class clean_with_protobuf(Command): - user_options = [("all", "a", "")] - - def initialize_options(self): - self.all = True - pass - - def finalize_options(self): - pass - - def run(self): - for p in proto: - pb2 = p.replace(".proto", "_pb2.py") - if not os.path.exists(pb2): - continue - os.unlink(pb2) - setup( name="trustify", version="0.1", description="Trustify", author="Trustify project", license="", - url="https://trustify.net/", + url="https://letsencrypt.org", packages=[ - 'trustify', - 'trustify.protocol', - 'trustify.client', + 'letsencrypt', + 'letsencrypt.client', ], install_requires=[ #'dialog', @@ -75,7 +17,6 @@ setup( 'jose', 'jsonschema', 'M2Crypto', - 'protobuf', 'pycrypto', #'python-augeas', 'python2-pythondialog', @@ -85,8 +26,4 @@ setup( 'trustify = trustify.client.client:authenticate' ] }, - cmdclass={ - 'build_py': build_py_with_protobuf, - 'clean': clean_with_protobuf, - }, )