diff --git a/README.md b/README.md
index bbb03d8..c943969 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,22 @@ 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 .
+```
+
## Run test with example
After installation, it would possible to run the test example `visilibity_test.py`.
diff --git a/setup.py b/setup.py
index 37b7410..8852883 100644
--- a/setup.py
+++ b/setup.py
@@ -15,20 +15,22 @@
# 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 = [
- ('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',
diff --git a/visilibity.hpp b/visilibity.hpp
index efe1aa7..7e53391 100644
--- a/visilibity.hpp
+++ b/visilibity.hpp
@@ -47,14 +47,12 @@ 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