Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Git Actions workflows triggered by PR #339

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/compile-binaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:

jobs:
compile_binaries:
name: Build wheels on ${{ matrix.os }}
name: Compile binaries on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion build/linux/release/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BASE=/usr/local
BASE=/usr
BOOST_VERSION=
BOOST_INCLUDE = $(BASE)/include
C_PLATFORM=-static -pthread
Expand Down
2 changes: 1 addition & 1 deletion build/mac/release/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BASE=/usr/local
BASE=$(shell brew --prefix)
BOOST_VERSION=
BOOST_INCLUDE = $(BASE)/include
C_PLATFORM=-pthread
Expand Down
25 changes: 23 additions & 2 deletions build/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@
from distutils.util import convert_path
from distutils.sysconfig import customize_compiler
from distutils.ccompiler import show_compilers
from packaging.version import Version, InvalidVersion

def is_pep440_compliant(version_str):
try:
# Attempt to parse the version string using packaging's Version class
Version(version_str)
return True
except InvalidVersion:
# If parsing fails, the version is not PEP 440 compliant
print(f"{version_str} is not PEP 440 compliant")
return False


# Path to the directory that contains this setup.py file.
Expand Down Expand Up @@ -59,7 +70,8 @@ def find_version():
version = f.read().strip()

print('Version found: %s (from version.py)' % version)
return version
if is_pep440_compliant(version):
return version

try:
git_output = subprocess.check_output(['git', 'describe', '--abbrev=7', '--dirty=@mod', '--always', '--tags'])
Expand All @@ -70,7 +82,8 @@ def find_version():
version = git_output.replace('-', '.dev', 1).replace('@', '-', 1).replace('-', '+', 1).replace('-','')

print('Version found %s (from git describe)' % version)
return version
if is_pep440_compliant(version):
return version
except:
pass

Expand Down Expand Up @@ -131,6 +144,14 @@ def locate_boost():
return include_dirs, '/usr/lib64'
elif glob.glob('/usr/lib/libboost*'):
return include_dirs, '/usr/lib'

# Added to support Mac with Apple Silicon
# on which homebrew's prefix is /opt/homebrew
include_dirs = '/opt/homebrew/include'

if os.path.isdir(include_dirs + os.path.sep + 'boost'):
if glob.glob('/opt/homebrew/lib/libboost*'):
return include_dirs, '/opt/homebrew/lib/'

return None, None

Expand Down
4 changes: 1 addition & 3 deletions src/lib/vina.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
#include <boost/log/trivial.hpp>
#include <boost/log/expressions.hpp>
#include <boost/program_options.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/filesystem/exception.hpp>
#include <boost/filesystem/convenience.hpp> // filesystem::basename
#include <boost/filesystem.hpp>
#include <boost/thread/thread.hpp> // hardware_concurrency // FIXME rm ?
#include <boost/algorithm/string.hpp>
//#include <openbabel/mol.h>
Expand Down
4 changes: 1 addition & 3 deletions src/split/split.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
#include <fstream> // getline?
#include <cmath> // for ceila
#include <boost/program_options.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/filesystem/exception.hpp>
#include <boost/filesystem/convenience.hpp> // filesystem::basename
#include <boost/filesystem.hpp>

#include "file.h"
#include "parse_error.h"
Expand Down
Loading