This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/tsfile.git
The following commit(s) were added to refs/heads/develop by this push:
new f1714915 Add clean up for python wrapper (#175)
f1714915 is described below
commit f1714915e1a1a7936076d745184112177e3ea0a9
Author: Haonan <[email protected]>
AuthorDate: Sat Jul 13 12:48:00 2024 +0800
Add clean up for python wrapper (#175)
---
python/pom.xml | 17 +++++++++++++++++
python/setup.py | 6 +++++-
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/python/pom.xml b/python/pom.xml
index 94856f7e..2c6a7b70 100644
--- a/python/pom.xml
+++ b/python/pom.xml
@@ -122,6 +122,23 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <configuration>
+ <filesets>
+ <fileset>
+ <directory>${basedir}/tsfile</directory>
+ <includes>
+ <include>*.so*</include>
+ <include>*.dll</include>
+ <include>*.h</include>
+ <include>*.cpp</include>
+ </includes>
+ </fileset>
+ </filesets>
+ </configuration>
+ </plugin>
</plugins>
</build>
</project>
diff --git a/python/setup.py b/python/setup.py
index a356000c..bd438823 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -37,6 +37,11 @@ def copy_lib_files(system, source_dir, target_dir, suffix):
if os.path.exists(link_name):
os.remove(link_name)
os.symlink(lib_file_name, link_name)
+ if system == "Darwin":
+ link_name = os.path.join(target_dir, f"libtsfile.dylib")
+ if os.path.exists(link_name):
+ os.remove(link_name)
+ os.symlink(lib_file_name, link_name)
def copy_header(source, target):
@@ -58,7 +63,6 @@ include_dir = os.path.join(project_dir, "tsfile")
source_file = os.path.join(project_dir, "tsfile", "tsfile_pywrapper.pyx")
if platform.system() == "Darwin":
- copy_lib_files("Darwin", libtsfile_shard_dir, libtsfile_dir, "dylib")
copy_lib_files("Darwin", libtsfile_shard_dir, libtsfile_dir, "1.0.dylib")
elif platform.system() == "Linux":
copy_lib_files("Linux", libtsfile_shard_dir, libtsfile_dir, "so.1.0")