-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(deploy): use semantic release for deployment to PyPI
The version for PyPI was set to the hard-coded version in \__init__.py. This is now fixed.
- Loading branch information
1 parent
36df671
commit 04834ae
Showing
3 changed files
with
3 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
import sys | ||
|
||
__version__ = '0.0.1' | ||
|
||
# This is a variable to check if the library is a [+] library. | ||
setattr(sys.modules[__name__], 'isplus', False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
[semantic_release] | ||
version_variable = ladybug_geometry/__init__.py:__version__ | ||
|
||
[bdist_wheel] | ||
universal = 1 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,19 @@ | ||
import re | ||
import setuptools | ||
import sys | ||
|
||
with open("README.md", "r") as fh: | ||
long_description = fh.read() | ||
|
||
with open('ladybug_geometry/__init__.py', 'r') as fd: | ||
version = re.search( | ||
r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', | ||
fd.read(), | ||
re.MULTILINE | ||
).group(1) | ||
|
||
try: | ||
from semantic_release import setup_hook | ||
setup_hook(sys.argv) | ||
except ImportError: | ||
pass | ||
|
||
setuptools.setup( | ||
name="ladybug-geometry", | ||
version=version, | ||
use_scm_version = True, | ||
setup_requires=['setuptools_scm'], | ||
author="Ladybug Tools", | ||
author_email="[email protected]", | ||
description="Ladybug geometry is a Python library that adds geometry objects and basic geometric computation to Ladybug.", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/ladybug-tools/ladybug-geometry", | ||
packages=setuptools.find_packages(), | ||
packages=setuptools.find_packages(exclude=["tests"]), | ||
install_requires=[ | ||
], | ||
classifiers=[ | ||
|