Skip to content

Commit

Permalink
use importlib (v2.1.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
markuskimius committed Mar 2, 2024
1 parent 619f587 commit cc9ea0d
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion bin/csvalign
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ from csvmagic import libcsv

__copyright__ = 'Copyright 2020-2022 Mark Kim'
__license__ = 'Apache 2.0'
__version__ = '2.0.0'
__version__ = '2.1.0'
__author__ = 'Mark Kim'


Expand Down
2 changes: 1 addition & 1 deletion bin/csvcsv
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ from csvmagic import libcsv

__copyright__ = 'Copyright 2020-2022 Mark Kim'
__license__ = 'Apache 2.0'
__version__ = '2.0.0'
__version__ = '2.1.0'
__author__ = 'Mark Kim'


Expand Down
2 changes: 1 addition & 1 deletion bin/csvcut
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ from csvmagic import libcsv

__copyright__ = 'Copyright 2019-2022 Mark Kim'
__license__ = 'Apache 2.0'
__version__ = '2.0.0'
__version__ = '2.1.0'
__author__ = 'Mark Kim'


Expand Down
2 changes: 1 addition & 1 deletion bin/csvgrep
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ from csvmagic import libcsv

__copyright__ = 'Copyright 2019-2022 Mark Kim'
__license__ = 'Apache 2.0'
__version__ = '2.0.0'
__version__ = '2.1.0'
__author__ = 'Mark Kim'


Expand Down
6 changes: 3 additions & 3 deletions bin/csvread
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ import sys
import errno
import getopts
import importlib
import pkg_resources
import importlib_resources
from csvmagic import libcsv
from itertools import zip_longest

__copyright__ = 'Copyright 2019-2022 Mark Kim'
__license__ = 'Apache 2.0'
__version__ = '2.0.0'
__version__ = '2.1.0'
__author__ = 'Mark Kim'


Expand Down Expand Up @@ -170,7 +170,7 @@ def setup_environ():
# Add plugin paths to sys.path
sys.path = [
os.path.join(SCRIPTDIR, '..', 'plugins'),
pkg_resources.resource_filename('csvmagic', 'plugins'),
os.path.join(importlib_resources.files('csvmagic'), 'plugins'),
] + sys.path

if 'CSV_PLUGINS_PATH' in os.environ:
Expand Down
2 changes: 1 addition & 1 deletion bin/csvsql
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ from csvmagic import libcsv

__copyright__ = 'Copyright 2020-2022 Mark Kim'
__license__ = 'Apache 2.0'
__version__ = '2.0.0'
__version__ = '2.1.0'
__author__ = 'Mark Kim'


Expand Down
2 changes: 1 addition & 1 deletion lib/csvmagic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

__copyright__ = "Copyright 2019-2022 Mark Kim"
__license__ = "Apache 2.0"
__version__ = '2.0.0'
__version__ = '2.1.0'
__author__ = "Mark Kim"

2 changes: 1 addition & 1 deletion lib/csvmagic/libcsv.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

__copyright__ = 'Copyright 2019-2022 Mark Kim'
__license__ = 'Apache 2.0'
__version__ = '2.0.0'
__version__ = '2.1.0'
__author__ = 'Mark Kim'


Expand Down
2 changes: 1 addition & 1 deletion plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

__copyright__ = "Copyright 2019-2022 Mark Kim"
__license__ = "Apache 2.0"
__version__ = '2.0.0'
__version__ = '2.1.0'
__author__ = "Mark Kim"

2 changes: 1 addition & 1 deletion plugins/fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

__copyright__ = "Copyright 2018-2022 Mark Kim"
__license__ = "Apache 2.0"
__version__ = '2.0.0'
__version__ = '2.1.0'
__author__ = "Mark Kim"


Expand Down
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
setup(
name = "csvmagic",
description = "CSV Utilities",
version = "2.0.0",
version = "2.1.0",
license = "Apache 2.0",
author = "Mark Kim",
author_email = "[email protected]",
Expand Down Expand Up @@ -39,5 +39,8 @@
],
packages = find_packages("lib"),
package_dir = { "": "lib" },
install_requires = [ "getopts" ],
install_requires = [
"getopts",
"importlib_resources",
],
)

0 comments on commit cc9ea0d

Please sign in to comment.