Skip to content

Commit

Permalink
Modified version config for setup.py
Browse files Browse the repository at this point in the history
Signed-off-by: Kharude, Sachin <sachin.kharude@here.com>
  • Loading branch information
Kharude, Sachin authored and omanges committed Jul 24, 2020
1 parent 036f7e9 commit 706d81e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ universal=1

[metadata]
name = xyzspaces
version = __version__
author = HERE Europe B.V.
author_email = XYZSPACES_PYTHON_SUPPORT@here.com
home-page = https://github.com/heremaps/xyz-spaces-python
description = Manage your XYZ Hub server or HERE Data Hub from Python
long-description = file: README.md
Expand Down
13 changes: 10 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

from setuptools import find_packages, setup

__version__ = "0.0.1"

here = path.abspath(path.dirname(__file__))

Expand All @@ -39,14 +38,22 @@
with open(path.join(here, "requirements_dev.txt"), encoding="utf-8") as f:
dev_reqs = f.read().strip().split("\n")

packages = find_packages(exclude=["docs", "tests"])

version = {}
with open('{}/__version__.py'.format(packages[0])) as f:
exec(f.read(), version)


download_url = (
"https://github.com/heremaps/xyz-spaces-python"
"/archive/" + __version__ + ".zip"
"/archive/" + version['__version__'] + ".zip"
)

setup(
# download_url=download_url,
packages=find_packages(exclude=["docs", "tests"]),
packages=packages,
version=version['__version__'],
include_package_data=True,
install_requires=install_requires,
dependency_links=dependency_links,
Expand Down
20 changes: 20 additions & 0 deletions xyzspaces/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (C) 2019-2020 HERE Europe B.V.
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0
# License-Filename: LICENSE

"""Project version information."""

__version__ = "0.0.1"

0 comments on commit 706d81e

Please sign in to comment.