Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/python3 12 #34

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ MANIFEST

# user defined
.scripts

.venv
venv
6 changes: 0 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,3 @@ The following description aims to show how to implement a new naming convention:
To allow this, one can define methods tagged with *property* in the current class. *SmartFilename* then handles the properties of the inherited class equally to a common filename entry given in the field definition.

- Add tests to "tests" and name the test file "test_[]_naming.py", where "[]" should be replaced by the abbreviation of the new naming convention.

Note
====

This project has been set up using PyScaffold 3.1. For details and usage
information on PyScaffold see https://pyscaffold.org/.
12 changes: 2 additions & 10 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

[metadata]
name = geopathfinder
version = attr: geopathfinder.__version__
description = Creating, quering, and searching in data structures holding geo-datasets.
author = Bernhard Bauer-Marschallinger
author-email = bbm@geo.tuwien.ac.at
license = mit
url = https://pyscaffold.org/
url = https://github.com/TUW-GEO/geopathfinder
long-description = file: README.rst
# Change if running only on Windows, Mac or Linux (comma-separated)
platforms = any
Expand All @@ -24,8 +25,6 @@ packages = find:
include_package_data = True
package_dir =
=src
# DON'T CHANGE THE FOLLOWING LINE! IT WILL BE UPDATED BY PYSCAFFOLD!
setup_requires = pyscaffold>=3.1a0,<3.2a0
# Add here dependencies of your project (semicolon/line-separated), e.g.
# install_requires = numpy; scipy
install_requires =
Expand Down Expand Up @@ -110,10 +109,3 @@ exclude =
.eggs
docs/conf.py

[pyscaffold]
# PyScaffold's parameters when the project was created.
# This will be used when updating. Do not change!
version = 3.1
package = geopathfinder
extensions =
no_skeleton
23 changes: 1 addition & 22 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Setup file for geopathfinder.
Use setup.cfg to configure your project.

This file was generated with PyScaffold 3.1.
PyScaffold helps you to put up the scaffold of your new Python project.
Learn more under: https://pyscaffold.org/
"""
import sys

from pkg_resources import require, VersionConflict
from setuptools import setup

try:
require('setuptools>=38.3')
except VersionConflict:
print("Error: version of setuptools is too old (<38.3)!")
sys.exit(1)


if __name__ == "__main__":
setup(use_pyscaffold=True)
setup()
18 changes: 13 additions & 5 deletions src/geopathfinder/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# -*- coding: utf-8 -*-
import pkg_resources
import sys

if sys.version_info[:2] >= (3, 8):
from importlib.metadata import PackageNotFoundError, version # pragma: no cover
else:
from importlib_metadata import PackageNotFoundError, version # pragma: no cover

try:
__version__ = pkg_resources.get_distribution(__name__).version
except:
__version__ = 'unknown'
# Change here if project is renamed and does not equal the package name
dist_name = __name__
__version__ = version(dist_name)
except PackageNotFoundError: # pragma: no cover
__version__ = "unknown"
finally:
del version, PackageNotFoundError