Skip to content

Commit

Permalink
Applied updates
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Nov 28, 2017
1 parent ca95257 commit 3c7be98
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ before_install:
- if test ${TARGET} = "coverity"; then echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-; fi
install:
- if test ${TRAVIS_OS_NAME} = "osx"; then export SED="/usr/local/bin/gsed"; fi
- if test ${TARGET} = "shared"; then ./syncsharedlibs.sh --use-head; fi
- ./synclibs.sh --use-head && ./autogen.sh
- if test ${TARGET} = "shared"; then ./configure > /dev/null && make > /dev/null && ./syncsharedlibs.sh --use-head; fi
- if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
script:
- if test ${TRAVIS_OS_NAME} = "linux"; then export PATH=$(echo $PATH | tr ":" "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s/::/:/g"); fi
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ test_script:
- ps: if ($env:TARGET -eq "vs2017") {
.\runtests.ps1 }
- cmd: if [%TARGET%]==[cygwin] (
C:\cygwin\bin\bash -e -l -c "cd libevtx && export CHECK_WITH_STRACE=1 && ./runtests.sh" )
C:\cygwin\bin\bash -e -l -c "cd libevtx && ./runtests.sh" )
- cmd: if [%TARGET%]==[cygwin64] (
C:\cygwin64\bin\bash -e -l -c "cd libevtx && ./runtests.sh" )
- cmd: if [%TARGET%]==[mingw] (
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ AC_PREREQ( 2.59 )

AC_INIT(
[libevtx],
[20171031],
[20171128],
[joachim.metz@gmail.com])

AC_CONFIG_SRCDIR(
Expand Down
20 changes: 11 additions & 9 deletions runtests.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# Script that runs the tests
#
# Version: 20171026
# Version: 20171127

EXIT_SUCCESS=0;
EXIT_FAILURE=1;
Expand Down Expand Up @@ -174,14 +174,16 @@ run_configure_make_check_python()

run_setup_py_tests()
{
PYTHON=$1;

if test ${CHECK_WITH_STRACE} -eq 1;
# Skip this test when running Cygwin on AppVeyor.
if test -n "${APPVEYOR}" && test ${TARGET} = "cygwin";
then
strace ${PYTHON} setup.py build;
else
${PYTHON} setup.py build;
echo "Running: 'setup.py build' skipped";

return ${EXIT_SUCCESS};
fi
PYTHON=$1;

${PYTHON} setup.py build;
RESULT=$?;

if test ${RESULT} -ne ${EXIT_SUCCESS};
Expand Down Expand Up @@ -265,7 +267,7 @@ then
PYTHON2=`which python2 2> /dev/null`;

# Note that "test -x" on Mac OS X will succeed if the argument is not set.
if test ! -z ${PYTHON2} && test -x ${PYTHON2};
if test -n "${PYTHON2}" && test -x ${PYTHON2};
then
export PYTHON_VERSION=2;

Expand Down Expand Up @@ -296,7 +298,7 @@ then
PYTHON3=`which python3 2> /dev/null`;

# Note that "test -x" on Mac OS X will succeed if the argument is not set.
if test ! -z ${PYTHON3} && test -x ${PYTHON3};
if test -n "${PYTHON3}" && test -x ${PYTHON3};
then
export PYTHON_VERSION=3;

Expand Down
12 changes: 9 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
#
# Script to build and install Python-bindings.
# Version: 20160316
# Version: 20171105

from __future__ import print_function
import glob
Expand Down Expand Up @@ -166,10 +166,10 @@ def run(self):


class ProjectInformation(object):
"""Class to define the project information."""
"""Project information."""

def __init__(self):
"""Initializes a project information object."""
"""Initializes project information."""
super(ProjectInformation, self).__init__()
self.include_directories = []
self.library_name = None
Expand Down Expand Up @@ -300,6 +300,12 @@ def GetPythonLibraryDirectoryPath():
# shared libaries since pip does not integrate well with the system package
# management.
for library_name in project_information.library_names:
for source_file in glob.glob(os.path.join(library_name, "*.[ly]")):
generated_source_file = "{0:s}.c".format(source_file[:-2])
if not os.path.exists(generated_source_file):
raise RuntimeError("Missing generated source file: {0:s}".format(
generated_source_file))

source_files = glob.glob(os.path.join(library_name, "*.c"))
SOURCES.extend(source_files)

Expand Down

0 comments on commit 3c7be98

Please sign in to comment.