Skip to content
Draft
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
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
python -m pip install --upgrade pip
pip install pylint==2.15.*
pip install mock
pip install packaging
pip install requests==2.28.*
- name: Analysing the code with pylint
run: |
Expand Down
1 change: 1 addition & 0 deletions conda_env/gdal-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dependencies:
- bs4=4.11.*
- lxml=4.9.*
- matplotlib=3.4.3
- packaging
- autopep8=2.0.*
- mock
- twine
Expand Down
1 change: 1 addition & 0 deletions conda_env/gdal-user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- bs4=4.11.*
- lxml=4.9.*
- matplotlib=3.4.3
- packaging
- pip
- pip:
- wahoomc==4.3.0
4 changes: 3 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ classifiers =
[options]
packages = wahoomc, wahoomc.init
python_requires = >=3.10
install_requires =
packaging

[options.package_data]
wahoomc = resources/*.*, resources/*/*.*, resources/*/*/*.*, resources/*/*/*/*.*, tooling_win/*.*, tooling_win/*/*.*, tooling_win/*/*/*.*, tooling_win/*/*/*/*.*
wahoomc = resources/*.*, resources/*/*.*, resources/*/*/*.*, resources/*/*/*/*.*, tooling_win/*.*, tooling_win/*/*.*, tooling_win/*/*/*.*, tooling_win/*/*/*/*.*
4 changes: 2 additions & 2 deletions tests/test_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import unittest
import platform
import os
import pkg_resources
from packaging.version import parse as parse_version

# import custom python packages
from wahoomc.setup_functions import is_program_installed, is_map_writer_plugin_installed, \
Expand Down Expand Up @@ -97,7 +97,7 @@ def test_version_constants_against_pypi(self):
"""
tests, if the version of constants.py is equal to the latest available version on PyPI
"""
latest_version = pkg_resources.parse_version(
latest_version = parse_version(
get_latest_pypi_version()).public

self.assertEqual(
Expand Down
6 changes: 3 additions & 3 deletions wahoomc/setup_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import shutil
from pathlib import Path
import sys
import pkg_resources
from packaging.version import parse as parse_version

# import custom python packages
from wahoomc.file_directory_functions import delete_everything_in_folder, write_json_file_generic, \
Expand Down Expand Up @@ -52,7 +52,7 @@ def adjustments_due_to_breaking_changes():
# and not 'tooling_win/Osmosis'
# - to cleanup, tooling_win/ dir files and folders are deleted here.
if (version_last_run is None or \
pkg_resources.parse_version(VERSION) <= pkg_resources.parse_version('4.2.1')) and \
parse_version(VERSION) <= parse_version('4.2.1')) and \
platform.system() == "Windows":
log.info(
'Last run was with version %s, deleting Windows Tooling files of %s directory due to possible bad files.', version_last_run, USER_TOOLING_WIN_DIR)
Expand Down Expand Up @@ -254,7 +254,7 @@ def check_installed_version_against_latest_pypi():

# compare installed version against latest and issue a info if a new version is available
if latest_version \
and pkg_resources.parse_version(VERSION) < pkg_resources.parse_version(latest_version):
and parse_version(VERSION) < parse_version(latest_version):
log.info('\n\nUpdate available! \
\nA new version of wahoomc is available: "%s". You have installed version "%s". \
\nUpgrade wahoomc with "pip install wahoomc --upgrade". \
Expand Down
Loading