Skip to content

Commit 7981e13

Browse files
author
doyougnu
committed
copyright: fix date with pure python
1 parent ef883a2 commit 7981e13

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SPHINXOPTS ?=
77
SPHINXBUILD ?= sphinx-build
88
SOURCEDIR = .
99
BUILDDIR = _build
10-
SOURCE_DATE_EPOCH = $(shell git log -1 --format=%ct)
10+
# SOURCE_DATE_EPOCH = $(shell git log -1 --format=%ct)
1111

1212
# Put it first so that "make" without argument is like "make help".
1313
help:

conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
import os
1414
import sys
1515
import time
16+
from datetime import datetime
17+
from sphinx.util.i18n import format_date
1618

1719
## FIXME for the time being I've cloned relevant extensions into a submodule,
1820
## and then hard linked the __init__.py file until my changes can be upstreamed
@@ -23,7 +25,8 @@
2325
project = 'Haskell Optimization Handbook'
2426
html_title = 'Haskell Optimization Handbook'
2527
# FIXME: https://github.com/haskellFoundation/hs-opt-handbook.github.io/issues/58
26-
copyright = u'2022-%s, Jeffrey Young (doyougnu)' % time.strftime('%Y')
28+
now = datetime.now()
29+
copyright = u'2022-%s, Jeffrey Young (doyougnu)' % now.year
2730
author = 'Jeffrey Young (doyugnu)'
2831

2932
# The full version, including alpha/beta/rc tags

hoh.nix

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ pkgs.stdenv.mkDerivation {
3131
src = ./.;
3232
propagatedBuildInputs = pythonInputs ++ nonPythonInputs;
3333

34-
# set SOURCE_DATE_EPOCH using git, fixes #58
35-
shellHook = ''
36-
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
37-
'';
38-
3934
buildPhase = ''
4035
runHook preBuild
4136
make ${target} SPHINXOPTS="-W"

0 commit comments

Comments
 (0)