Compare commits

..

No commits in common. "f8f779136bf5505cd7e3eaee31fead0f739eca6e" and "3c72747def17e27e6d5a0dc3e5674e6bf85f72dc" have entirely different histories.

5 changed files with 23 additions and 63 deletions

View File

@ -2,9 +2,18 @@ from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
import os
import sys
print("building on platform: "+sys.platform)
extensions = Extension(
name="tdm_termite",
sources=["cython/py_tdm_termite.pyx"],
# libraries=[""],
# library_dirs=["lib"],
include_dirs=["lib","3rdparty/pugixml"],
language='c++',
extra_compile_args=['-std=c++17','-Wno-unused-variable'],
extra_link_args=['-std=c++17'],
)
os.system("git tag > gittags.log")
with open ("gittags.log","r") as gt:
taglst = gt.readlines()
@ -15,27 +24,6 @@ else:
version = 'unkown'
print("building version: "+version)
if sys.platform == "linux" or sys.platform == "darwin" :
cmpargs = ['-std=c++17','-Wno-unused-variable']
lnkargs = ['-std=c++17','-Wno-unused-variable']
elif sys.platform == "win32" :
cmpargs = ['/EHsc','/std:c++17']
lnkargs = []
else :
raise RuntimeError("unknown platform")
extensions = Extension(
name="tdm_termite",
sources=["cython/py_tdm_termite.pyx"],
# libraries=[""],
# library_dirs=["lib"],
include_dirs=["lib","3rdparty/pugixml"],
language='c++',
#extra_compile_args=['-std=c++17','-Wno-unused-variable'],
extra_compile_args= cmpargs,
extra_link_args= lnkargs,
)
setup(
version=version,
description='TDMtermite cython extension',

View File

@ -852,7 +852,7 @@ void tdm_termite::print_group(std::string &id, const char* filename, bool includ
for ( std::string chn: chngrp.channels_ )
{
std::vector<tdmdatatype> chndat = this->get_channel(chn);
if ( chndat.size() > maxrows ) maxrows = (unsigned int)chndat.size();
if ( chndat.size() > maxrows ) maxrows = chndat.size();
allchns.push_back(chndat);
}
@ -917,7 +917,7 @@ void tdm_termite::check_filename_path(const char* filename)
if ( !std::filesystem::is_directory(pt) )
{
throw std::runtime_error( std::string("directory does not exist: ") + pt.u8string() );
throw std::runtime_error(std::string("directory does not exist: ") + pt.c_str() );
}
}

View File

@ -21,10 +21,7 @@ LIB := $(foreach dir,$(shell ls $(LIBB)),-I $(LIBB)$(dir))
# determine git version/commit tag
GTAG := $(shell git tag | tail -n1)
GTAGV := $(shell git tag | tail -n1 | tr -d 'v')
GHSH := $(shell git rev-parse HEAD | head -c8)
PIPYVS := $(shell grep "version" pip/setup.py | tr -d 'version=",# ')
PICGVS := $(shell grep "version" pip/setup.cfg | tr -d 'version=",# ')
# define install location
INST := /usr/local/bin
@ -33,18 +30,6 @@ INST := /usr/local/bin
OST := $(shell uname)
CWD := $(shell pwd)
# --------------------------------------------------------------------------- #
# version/tag check
checkversion:
@echo "git tag: "$(GTAG)
@echo "git head: "$(GHSH)
@echo "pip setup.py version: "$(PIPYVS)
@echo "pip setup.cfg version: "$(PICGVS)
$(GTAGV):
@echo "check consistent versions (git tag vs. setup.py): "$(GTAG)" <-> "$(PIPYVS)" "
# --------------------------------------------------------------------------- #
# CLI tool
@ -131,7 +116,7 @@ docker-clean:
# --------------------------------------------------------------------------- #
# pip
pip-publish: $(PIPYVS) cython-build
pip-publish: cython-build
cd pip/ && make pip-publish
pip-test:

View File

@ -1,6 +1,6 @@
[metadata]
name = TDMtermite-RecordEvolution
version = 1.0.1
version = 0.5
author = Record Evolution GmbH
author_email = mario.fink@record-evolution.de
maintainer = Record Evolution GmbH

View File

@ -1,24 +1,12 @@
from setuptools import setup, Extension
import sys
print("building on platform: "+sys.platform)
if sys.platform == "linux" or sys.platform == "darwin" :
cmpargs = ['-std=c++17','-Wno-unused-variable']
lnkargs = ['-std=c++17','-Wno-unused-variable']
elif sys.platform == "win32" :
cmpargs = ['/EHsc','/std:c++17']
lnkargs = []
else :
raise RuntimeError("unknown platform")
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name="TDMtermite",
version="1.0.2",
version="1.0.0", #version,
author="Record Evolution GmbH",
author_email="mario.fink@record-evolution.de",
maintainer="Record Evolution GmbH",
@ -38,12 +26,11 @@ setup(
],
ext_modules=[Extension("tdm_termite",
["py_tdm_termite.cpp"],
# libraries_dirs = ["cython/"],
# include_dirs = ["3rdparty/pugixml/","lib/"],
# depends = ["../lib/tdm_termite.hpp"]
language = 'c++',
extra_compile_args = cmpargs,
extra_link_args = lnkargs,
)
],
# libraries_dirs=["cython/"],
# include_dirs=["3rdparty/pugixml/","lib/"],
# depends=["../lib/tdm_termite.hpp"]
language='c++',
extra_compile_args=['-std=c++17','-Wno-unused-variable'],
extra_link_args=['-std=c++17'],
)],
)