Skip to content

Commit

Permalink
Merge pull request #490 from jcarpent/topic/windows
Browse files Browse the repository at this point in the history
Remove support of Python 3.7
  • Loading branch information
jcarpent authored Aug 14, 2024
2 parents 66d1e0d + 1f165c5 commit 4ee9f2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Added
- Add compatibility with jrl-cmakemodules workspace ([#485](https://github.com/stack-of-tasks/eigenpy/pull/485))
- Remove support of Python 3.7 ([#490](https://github.com/stack-of-tasks/eigenpy/pull/490))

### Fixed
- Remove CMake CMP0167 warnings ([#487](https://github.com/stack-of-tasks/eigenpy/pull/487))
Expand Down
20 changes: 1 addition & 19 deletions python/eigenpy/windows_dll_manager.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import contextlib
import os
import sys


def get_dll_paths():
Expand All @@ -22,20 +21,6 @@ def get_dll_paths():
return eigenpy_paths.split(os.pathsep)


class PathManager(contextlib.AbstractContextManager):
"""Restore PATH state after importing Python module"""

def add_dll_directory(self, dll_dir: str):
os.environ["PATH"] += os.pathsep + dll_dir

def __enter__(self):
self.old_path = os.environ["PATH"]
return self

def __exit__(self, *exc_details):
os.environ["PATH"] = self.old_path


class DllDirectoryManager(contextlib.AbstractContextManager):
"""Restore DllDirectory state after importing Python module"""

Expand All @@ -59,7 +44,4 @@ def __exit__(self, *exc_details):


def build_directory_manager():
if sys.version_info >= (3, 8):
return DllDirectoryManager()
else:
return PathManager()
return DllDirectoryManager()

0 comments on commit 4ee9f2f

Please sign in to comment.