Skip to content

Commit 398a04c

Browse files
authored
In tesseract_viewer_python setup.py parse package.xml for version instead of using cmake configure file (#40)
1 parent 77ba6b2 commit 398a04c

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

tesseract_viewer_python/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ STRING (REGEX REPLACE "<version>([0-9]+\\.[0-9]+\\.[0-9]+)</version>" "\\1" tess
3131
STRING (STRIP ${tesseract_viewer_python_version2} tesseract_viewer_python_version)
3232
MESSAGE(STATUS "tesseract_viewer_python version: ${tesseract_viewer_python_version}")
3333

34-
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/setup.py.in" "${CMAKE_CURRENT_BINARY_DIR}/python/setup.py" @ONLY)
35-
3634
if(NOT TESSERACT_PYTHON_BUILD_WHEEL)
3735

3836
set(enable_setuptools_deb_layout OFF)

tesseract_viewer_python/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<package format="3">
33
<name>tesseract_viewer_python</name>
4-
<version>0.2.2</version>
4+
<version>0.2.3</version>
55
<description>The tesseract_viewer_python package</description>
66
<maintainer email="wason@wasontech.com">John Wason</maintainer>
77
<license>Apache 2.0</license>

tesseract_viewer_python/cmake/setup.py.in renamed to tesseract_viewer_python/setup.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
# Based on https://github.com/robotraconteur/robotraconteur/blob/master/RobotRaconteurPython/setup.py.in
22

33
from setuptools import setup, Distribution
4+
import os
5+
from xml.etree import ElementTree as ET
6+
7+
tree = ET.parse(os.path.join(os.path.dirname(__file__), 'package.xml'))
8+
root = tree.getroot()
9+
version = root.find('version').text
10+
411

512
setup(name='tesseract-robotics-viewer',
6-
version='@tesseract_viewer_python_version@',
13+
version=version,
714
description='Tesseract Viewer Python Library',
815
author='John Wason',
916
author_email='wason@wasontech.com',

0 commit comments

Comments
 (0)