Infer version from java/pom.xml

Change-Id: I15222a85934d68cb458ed2e05251ff98fd8f9c77
This commit is contained in:
Uwe L. Korn committed 2016-12-20 18:30:35 +01:00
1 parent 05c44ea74f
commit 39753f8ada
2 files changed
+11

No files matched your search

File renamed without changes.
+11
View File
@@ -257,6 +257,17 @@ class build_ext(_build_ext):
DESC = """\
Python library for Apache Arrow"""
# In the case of a git-archive, we don't have any version information
# from the SCM to infer a version. The only source is the java/pom.xml.
#
# Note that this is only the case for git-archives. sdist tarballs have
# all relevant information (but not the Java sources).
if not os.path.exists('../.git') and os.path.exists('../java/pom.xml'):
import xml.etree.ElementTree as ET
tree = ET.parse('../java/pom.xml')
version_tag = list(tree.getroot().findall('{http://maven.apache.org/POM/4.0.0}version'))[0]
os.environ["SETUPTOOLS_SCM_PRETEND_VERSION"] = version_tag.text.replace("-SNAPSHOT", "a0")
setup(
name="pyarrow",
packages=['pyarrow', 'pyarrow.tests'],