From 25d17af55dada3650050df5883e1eb6f6590bd08 Mon Sep 17 00:00:00 2001 From: Ben Kamphaus Date: Fri, 26 Feb 2016 10:40:19 -0700 Subject: [PATCH 1/2] testing simple m4 solution for generating setup w/revision --- bin/make-release | 2 ++ setup.py.m4 | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100755 bin/make-release create mode 100644 setup.py.m4 diff --git a/bin/make-release b/bin/make-release new file mode 100755 index 0000000..cded2bf --- /dev/null +++ b/bin/make-release @@ -0,0 +1,2 @@ +#!/bin/bash +m4 -DREVISION=`bin/revision` setup.py.m4 > setup.py diff --git a/setup.py.m4 b/setup.py.m4 new file mode 100644 index 0000000..735f343 --- /dev/null +++ b/setup.py.m4 @@ -0,0 +1,27 @@ +#!/usr/bin/env python + +## Copyright 2014 Cognitect. All Rights Reserved. +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS-IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. + +from setuptools import setup, find_packages +import subprocess + +setup(name="transit-python", + version="0.8.REVISION", + description="Transit marshalling for Python", + author="Cognitect", + url="https://github.com/cognitect/transit-python", + packages=find_packages(), + install_requires=["python-dateutil", "msgpack-python"]) + From 1d1859632f251bd51ec4942f36fbe2f2baf2b6c8 Mon Sep 17 00:00:00 2001 From: Ben Kamphaus Date: Fri, 26 Feb 2016 10:56:27 -0700 Subject: [PATCH 2/2] keep generated setup.py stencil w/correct permissions --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index f00e09b..784dd7b 100755 --- a/setup.py +++ b/setup.py @@ -16,10 +16,9 @@ from setuptools import setup, find_packages import subprocess -revision = subprocess.check_output("./bin/revision") setup(name="transit-python", - version="0.8."+revision, + version="0.8.279", description="Transit marshalling for Python", author="Cognitect", url="https://github.com/cognitect/transit-python",