Skip to content
Open
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,6 @@ nosetests.xml
ui_*.py

# Mac dirs
.DS_Storedoc/_build/
.DS_Store
doc/_build/
doc/_build/*
11 changes: 6 additions & 5 deletions src/openalea/visualea/metainfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@


def get_version():

import pkg_resources
dists = pkg_resources.require("openalea.visualea")
return dists[0].version
"Returns openalea.visualea version."
from importlib.metadata import metadata
meta = metadata("openalea.visualea")
release = meta.get("version")
return release

url = "http://openalea.rtfd.io"

def get_copyright():

return "Copyright \xa9 2006-2023 inria/CIRAD/INRAE\n"
return "Copyright \xa9 2006-2026 inria/CIRAD/INRAE\n"
15 changes: 10 additions & 5 deletions src/openalea/visualea/qt/designer.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@
]

import datetime
import pkg_resources
import sys
import os

from importlib.resources import files, as_file
from openalea.core.path import path as Path
import shutil
import tempfile


from qtpy.uic import compileUi
from qtpy import API as QT_MODULE_NAME
Expand All @@ -42,7 +45,7 @@
FORCE_UI_GENERATION = False


def get_data(name, path):
def get_data(name: str, path: str):
"""
Eases access to module packed data.

Expand All @@ -52,10 +55,12 @@ def get_data(name, path):
:param name: __name__
:param path: path relative to module "name"
"""
path = pkg_resources.resource_filename(name, path)
path = Path(path).abspath()
return path
#import pkg_resources
#path = pkg_resources.resource_filename(name, path)
#path = Path(path).abspath()
#return path

return Path(str(files(name).joinpath(path))).abspath()

def mtime(path):
"""Last-modified time of the file."""
Expand Down
239 changes: 0 additions & 239 deletions src/openalea/visualea/system_util.py

This file was deleted.

Loading