Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
chore: prevent normalization of semver versioning (#97)
Browse files Browse the repository at this point in the history
* chore: prevent normalization of semver versioning

* chore: update workaround to make sic work
  • Loading branch information
dandhlee committed Apr 16, 2021
1 parent 8962097 commit 48e97d5
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion setup.py
Expand Up @@ -19,6 +19,21 @@

import setuptools

# Disable version normalization performed by setuptools.setup()
try:
# Try the approach of using sic(), added in setuptools 46.1.0
from setuptools import sic
except ImportError:
# Try the approach of replacing packaging.version.Version
sic = lambda v: v
try:
# setuptools >=39.0.0 uses packaging from setuptools.extern
from setuptools.extern import packaging
except ImportError:
# setuptools <39.0.0 uses packaging from pkg_resources.extern
from pkg_resources.extern import packaging
packaging.version.Version = packaging.version.LegacyVersion

name = "google-cloud-kms"
description = "Cloud Key Management Service (KMS) API client library"
version = "2.2.0"
Expand Down Expand Up @@ -52,7 +67,7 @@

setuptools.setup(
name=name,
version=version,
version=sic(version),
description=description,
long_description=readme,
author="Google LLC",
Expand Down

0 comments on commit 48e97d5

Please sign in to comment.