Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
try versioning correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Kanzer authored and Aaron Kanzer committed Nov 20, 2023
1 parent c2a440a commit e4822be
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ pip-wheel-metadata/
sandbox/
venv/
venvs/
.pypirc
Empty file added .pypirc
Empty file.
21 changes: 13 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,20 @@

try:
import versioneer

setup_kw = {
"version": versioneer.get_version(),
"cmdclass": versioneer.get_cmdclass(),
}
version_config = versioneer.get_version()
cmdclass = versioneer.get_cmdclass()
except ImportError:
# see https://github.com/warner/python-versioneer/issues/192
print("WARNING: failed to import versioneer, falling back to no version for now")
setup_kw = {}
version_config = "0.1.0" # Fallback version
cmdclass = {}

# Ensure the version is PEP 440 compliant
if '+' in version_config:
version_config = version_config.split('+')[0]

if __name__ == "__main__":
setup(name="lincbrain", **setup_kw)
setup(
name="lincbrain",
version="0.1.0",
cmdclass=cmdclass,
)

0 comments on commit e4822be

Please sign in to comment.