Skip to content

Commit 706d81e

Browse files
Kharude, Sachinomanges
Kharude, Sachin
authored andcommitted
Modified version config for setup.py
Signed-off-by: Kharude, Sachin <sachin.kharude@here.com>
1 parent 036f7e9 commit 706d81e

File tree

3 files changed

+31
-4
lines changed

3 files changed

+31
-4
lines changed

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ universal=1
33

44
[metadata]
55
name = xyzspaces
6-
version = __version__
76
author = HERE Europe B.V.
7+
author_email = XYZSPACES_PYTHON_SUPPORT@here.com
88
home-page = https://github.com/heremaps/xyz-spaces-python
99
description = Manage your XYZ Hub server or HERE Data Hub from Python
1010
long-description = file: README.md

setup.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
from setuptools import find_packages, setup
2424

25-
__version__ = "0.0.1"
2625

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

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

41+
packages = find_packages(exclude=["docs", "tests"])
42+
43+
version = {}
44+
with open('{}/__version__.py'.format(packages[0])) as f:
45+
exec(f.read(), version)
46+
47+
4248
download_url = (
4349
"https://github.com/heremaps/xyz-spaces-python"
44-
"/archive/" + __version__ + ".zip"
50+
"/archive/" + version['__version__'] + ".zip"
4551
)
4652

4753
setup(
4854
# download_url=download_url,
49-
packages=find_packages(exclude=["docs", "tests"]),
55+
packages=packages,
56+
version=version['__version__'],
5057
include_package_data=True,
5158
install_requires=install_requires,
5259
dependency_links=dependency_links,

xyzspaces/__version__.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (C) 2019-2020 HERE Europe B.V.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# SPDX-License-Identifier: Apache-2.0
16+
# License-Filename: LICENSE
17+
18+
"""Project version information."""
19+
20+
__version__ = "0.0.1"

0 commit comments

Comments
 (0)