mirror of
https://github.com/xcat2/confluent.git
synced 2026-10-20 06:35:33 +00:00
Version the Python package rpms with ~dev as well
confluent_client and confluent_server rpms took the PEP 440 version setup.py needs, 4.0.1.dev5+g..., which rpm sorts after 4.0.1: a released package did not upgrade a development build of it. Stamp the rpm with the ~dev form the other packages already use and keep .dev only for setup.py and the sdist name. The debs already sort right, since stdeb rewrites .dev to ~dev.
This commit is contained in:
@@ -32,8 +32,8 @@ Want to help? Submit a [Pull Request](https://github.com/xcat2/confluent/pulls).
|
||||
|
||||
The top-level `VERSION` file names the release the current branch is working toward. Build scripts
|
||||
call `./mkversion`, which turns it into the version stamped on packages: the tag itself on a release
|
||||
tag (`4.0.1`), otherwise a development version (`4.0.1.dev5+gdeadbee`, or `4.0.1~dev5+gdeadbee` for
|
||||
the packages that have no `setup.py`).
|
||||
tag (`4.0.1`), otherwise a development version (`4.0.1~dev5+gdeadbee`). Packages sort it before the
|
||||
release it leads up to. Only `setup.py` gets the PEP 440 spelling, `4.0.1.dev5+gdeadbee`.
|
||||
|
||||
`mkversion` also derives a version from the newest tag reachable from HEAD and uses whichever is
|
||||
higher, so forgetting to bump `VERSION` after tagging the current branch cannot walk the version
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
%define name confluent_client
|
||||
%define version #VERSION#
|
||||
# the sdist carries the PEP 440 spelling of the version (.dev, not ~dev)
|
||||
%define fversion %{lua:
|
||||
sv, _ = string.gsub("#VERSION#", "[~]", "-")
|
||||
sv, _ = string.gsub("#VERSION#", "[~]", ".")
|
||||
print(sv)
|
||||
}
|
||||
%define release 1
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
%define name confluent_common
|
||||
%define version #VERSION#
|
||||
# the sdist carries the PEP 440 spelling of the version (.dev, not ~dev)
|
||||
%define fversion %{lua:
|
||||
sv, _ = string.gsub("#VERSION#", "[~]", ".")
|
||||
print(sv)
|
||||
}
|
||||
%define release 1
|
||||
|
||||
Summary: common content for confluent client and server
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{release}
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Source0: %{name}-%{fversion}.tar.gz
|
||||
License: UNKNOWN
|
||||
Group: Development/Libraries
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||
@@ -19,7 +24,7 @@ Url: http://xcat.sf.net/
|
||||
This provides the modules common for both client and server
|
||||
|
||||
%prep
|
||||
%setup -n %{name}-%{version} -n %{name}-%{version}
|
||||
%setup -n %{name}-%{fversion}
|
||||
|
||||
%build
|
||||
python2 setup.py build
|
||||
|
||||
@@ -3,7 +3,10 @@ cd `dirname $0`
|
||||
if [ -x ./makeman ]; then
|
||||
./makeman
|
||||
fi
|
||||
VERSION=`./makesetup` || exit 1
|
||||
./makesetup > /dev/null || exit 1
|
||||
# setup.py needs the PEP 440 .dev form, the rpm the ~dev one, which sorts
|
||||
# before the release it leads up to
|
||||
VERSION=`../mkversion --tilde` || exit 1
|
||||
PKGNAME=$(basename $(pwd))
|
||||
python3 setup.py sdist > /dev/null 2>&1
|
||||
cp dist/*.tar.gz ~/rpmbuild/SOURCES
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
%define name confluent_server
|
||||
%define version #VERSION#
|
||||
# the sdist carries the PEP 440 spelling of the version (.dev, not ~dev)
|
||||
%define fversion %{lua:
|
||||
sv, _ = string.gsub("#VERSION#", "[~]", "-")
|
||||
sv, _ = string.gsub("#VERSION#", "[~]", ".")
|
||||
print(sv)
|
||||
}
|
||||
%define release 1
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#!/bin/sh
|
||||
# Print the version to stamp on packages built from this checkout.
|
||||
#
|
||||
# --tilde use "~dev" rather than ".dev" (packages with no setup.py; "~" sorts
|
||||
# before the release, ".dev" after, but PEP 440 requires ".dev")
|
||||
# --tilde use "~dev" rather than ".dev": the package version, as "~" sorts
|
||||
# before the release and ".dev" after it. Only setup.py takes ".dev",
|
||||
# which PEP 440 requires.
|
||||
#
|
||||
# The root VERSION file names the release this branch is working toward. Release
|
||||
# tags do not always live on master (3.15.2 through 3.15.6 are on branch 3.15), so
|
||||
|
||||
Reference in New Issue
Block a user