Skip to content

Commit

Permalink
Use VERSION file in pygribjump
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisspyB committed Oct 18, 2024
1 parent 83dfc9d commit 5c52026
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ CMakeFiles/
CMakeCache.txt
*.bak
.vim
*.egg-info
4 changes: 0 additions & 4 deletions pygribjump/src/pygribjump/pygribjump.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import numpy as np
import cffi
import os
from pkg_resources import parse_version
import findlibs

ffi = cffi.FFI()
Expand Down Expand Up @@ -58,11 +57,8 @@ def __init__(self):
print("Error retrieving attribute", f, "from library")

# Initialise the library, and set it up for python-appropriate behaviour

self.gribjump_initialise()

# TODO <see pyfdb version checking here.>

def __read_header(self, hdr_path):
with open(hdr_path, 'r') as f:
return f.read()
Expand Down
1 change: 0 additions & 1 deletion pygribjump/src/pygribjump/version.py

This file was deleted.

5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@

from setuptools import find_packages, setup

__version__ = re.search(
r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]', io.open("pygribjump/src/pygribjump/version.py", encoding="utf_8_sig").read()
).group(1)
with open("VERSION", "r") as f:
__version__ = f.read().strip()

setup(
name="pygribjump",
Expand Down

0 comments on commit 5c52026

Please sign in to comment.