From 7bf19a0bee4b746ec020810fcaa8d00c8b5bc356 Mon Sep 17 00:00:00 2001
From: MSSandroid <12539982+MSSandroid@users.noreply.github.com>
Date: Sun, 23 Feb 2025 18:33:26 +0100
Subject: [PATCH 1/6] msvc
---
visilibity.hpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/visilibity.hpp b/visilibity.hpp
index efe1aa7..d864923 100644
--- a/visilibity.hpp
+++ b/visilibity.hpp
@@ -47,14 +47,14 @@ License along with VisiLibity. If not, see .
//Uncomment these lines when compiling under
//Microsoft Visual Studio
-/*
+
#include
#define NAN std::numeric_limits::quiet_NaN()
#define INFINITY std::numeric_limits::infinity()
#define M_PI 3.141592653589793238462643
#define and &&
#define or ||
-*/
+// uncomment end
#include //math functions in std namespace
#include
From bb90cd12ca268ba77c31cb128384a2d2763cb356 Mon Sep 17 00:00:00 2001
From: MSSandroid <12539982+MSSandroid@users.noreply.github.com>
Date: Sun, 23 Feb 2025 18:42:56 +0100
Subject: [PATCH 2/6] change distutils to setuptools
---
setup.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/setup.py b/setup.py
index 37b7410..a0c95a8 100644
--- a/setup.py
+++ b/setup.py
@@ -15,8 +15,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see .
-from distutils.core import setup, Extension
-from distutils.command.build import build
+from setuptools import setup, Extension
+from setuptools.command.build import build
+
class CustomBuild(build):
sub_commands = [
From efac58007193e9957a5f8a35f7ff926acec0f5bd Mon Sep 17 00:00:00 2001
From: MSSandroid <12539982+MSSandroid@users.noreply.github.com>
Date: Sun, 23 Feb 2025 18:44:56 +0100
Subject: [PATCH 3/6] Update setup.py
---
setup.py | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/setup.py b/setup.py
index a0c95a8..8852883 100644
--- a/setup.py
+++ b/setup.py
@@ -21,15 +21,16 @@
class CustomBuild(build):
sub_commands = [
- ('build_ext', build.has_ext_modules),
- ('build_py', build.has_pure_modules),
- ('build_clib', build.has_c_libraries),
- ('build_scripts', build.has_scripts),
- ]
+ ('build_ext', lambda self: True),
+ ('build_py', lambda self: True),
+ ('build_clib', lambda self: True),
+ ('build_scripts', lambda self: True),
+ ]
+
+module = Extension('_visilibity', swig_opts=['-c++'],
+ sources=['visilibity.i', 'visilibity.cpp'],
+ include_dirs=['.']) # Assuming 'visilibity.hpp' is in the current directory
-module = Extension('_visilibity', swig_opts = ['-c++'],
- sources = ['visilibity.i', 'visilibity.cpp'],
- headers = ['visilibity.hpp'], include = ['visilibity.hpp'])
setup (name = 'VisiLibity',
version = '1.0.10',
From 328cc6df120c29e5e13fce1c2c1f06ad80fd1de4 Mon Sep 17 00:00:00 2001
From: MSSandroid <12539982+MSSandroid@users.noreply.github.com>
Date: Sun, 23 Feb 2025 18:47:46 +0100
Subject: [PATCH 4/6] Update visilibity.hpp
---
visilibity.hpp | 2 --
1 file changed, 2 deletions(-)
diff --git a/visilibity.hpp b/visilibity.hpp
index d864923..7e53391 100644
--- a/visilibity.hpp
+++ b/visilibity.hpp
@@ -49,8 +49,6 @@ License along with VisiLibity. If not, see .
//Microsoft Visual Studio
#include
-#define NAN std::numeric_limits::quiet_NaN()
-#define INFINITY std::numeric_limits::infinity()
#define M_PI 3.141592653589793238462643
#define and &&
#define or ||
From d54bdf17276f3fe634804c49704cafce9bedf01d Mon Sep 17 00:00:00 2001
From: MSSandroid <12539982+MSSandroid@users.noreply.github.com>
Date: Wed, 26 Feb 2025 11:13:06 +0100
Subject: [PATCH 5/6] Update README.md
---
README.md | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/README.md b/README.md
index bbb03d8..a5d64e8 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,24 @@ To install the Python package:
`pip install visilibity`
+### On Windows
+
+Make sure you have the buildtools installed:
+1. Download [Buildtools für Visual Studio 2022](https://aka.ms/vs/17/release/vs_BuildTools.exe)
+2. Select `C++ Tools for Linux Development` and install
+
+After that you need to install the `swig` and `cython`. When using conda just run
+```
+conda install swig boost cython
+```
+
+Now you can install the package with
+```
+pip install .
+```
+
+4.
+
## Run test with example
After installation, it would possible to run the test example `visilibity_test.py`.
From 67471a0cff410d74c5a96f86127fe2021bb97e48 Mon Sep 17 00:00:00 2001
From: MSSandroid <12539982+MSSandroid@users.noreply.github.com>
Date: Wed, 26 Feb 2025 11:14:24 +0100
Subject: [PATCH 6/6] Update README.md
---
README.md | 2 --
1 file changed, 2 deletions(-)
diff --git a/README.md b/README.md
index a5d64e8..c943969 100644
--- a/README.md
+++ b/README.md
@@ -31,8 +31,6 @@ Now you can install the package with
pip install .
```
-4.
-
## Run test with example
After installation, it would possible to run the test example `visilibity_test.py`.