Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

Commit

Permalink
Merge branch 'johannr/simplify-version-str'
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesring committed May 2, 2017
2 parents 101cec2 + 884ca79 commit 3a118a7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
4 changes: 3 additions & 1 deletion FIAT/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

from __future__ import absolute_import, print_function, division

import pkg_resources

# Import finite element classes
from FIAT.finite_element import FiniteElement, CiarletElement # noqa: F401
from FIAT.argyris import Argyris
Expand Down Expand Up @@ -39,7 +41,7 @@
from FIAT.reference_element import ufc_cell, ufc_simplex # noqa: F401
from FIAT.hdivcurl import Hdiv, Hcurl # noqa: F401

__version__ = "2017.1.0.dev0"
__version__ = pkg_resources.get_distribution("FIAT").version

# List of supported elements and mapping to element classes
supported_elements = {"Argyris": Argyris,
Expand Down
19 changes: 6 additions & 13 deletions doc/sphinx/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
import sys
import os
import shlex
import pkg_resources
import datetime

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down Expand Up @@ -52,19 +54,10 @@

# General information about the project.
project = u'FInite element Automatic Tabulator (FIAT)'
copyright = u'2015, FEniCS Project'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
import FIAT
fiat_version = FIAT.__version__

# The short X.Y version.
version = fiat_version
# The full version, including alpha/beta/rc tags.
release = fiat_version
this_year = datetime.date.today().year
copyright = u'%s, FEniCS Project' % this_year
version = pkg_resources.get_distribution("FIAT").version
release = version

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from __future__ import absolute_import, print_function, division

import re
import sys

try:
Expand All @@ -14,8 +13,7 @@
print("Python 2.7 or higher required, please upgrade.")
sys.exit(1)

version = re.findall('__version__ = "(.*)"',
open('FIAT/__init__.py', 'r').read())[0]
version = "2017.1.0.dev0"

url = "https://bitbucket.org/fenics-project/fiat/"
tarball = None
Expand Down

0 comments on commit 3a118a7

Please sign in to comment.