Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7aa14c2

Browse files
committed
v0.4
1 parent 0293a1a commit 7aa14c2

3 files changed

Lines changed: 3 additions & 65 deletions

File tree

doc/source/conf.py

Lines changed: 1 addition & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -145,69 +145,7 @@
145145
# Additional templates that should be rendered to pages, maps page names to
146146
# template names.
147147
#html_additional_pages = {}
148-
# -----------------------------------------------------------------------------
149-
# Source code links
150-
# -----------------------------------------------------------------------------
151-
152-
import inspect
153-
from os.path import relpath, dirname
154-
155-
for name in ['sphinx.ext.linkcode', 'linkcode', 'numpydoc.linkcode']:
156-
try:
157-
__import__(name)
158-
extensions.append(name)
159-
break
160-
except ImportError:
161-
pass
162-
else:
163-
print "NOTE: linkcode extension not found -- no links to source generated"
164-
165-
def linkcode_resolve(domain, info):
166-
"""
167-
Determine the URL corresponding to Python object
168-
"""
169-
if domain != 'py':
170-
return None
171-
172-
modname = info['module']
173-
fullname = info['fullname']
174-
175-
submod = sys.modules.get(modname)
176-
if submod is None:
177-
return None
178-
179-
obj = submod
180-
for part in fullname.split('.'):
181-
try:
182-
obj = getattr(obj, part)
183-
except:
184-
return None
185148

186-
try:
187-
fn = inspect.getsourcefile(obj)
188-
except:
189-
fn = None
190-
if not fn:
191-
return None
192-
193-
try:
194-
source, lineno = inspect.findsource(obj)
195-
except:
196-
lineno = None
197-
198-
if lineno:
199-
linespec = "#L%d" % (lineno + 1)
200-
else:
201-
linespec = ""
202-
203-
fn = relpath(fn, start=dirname(numpy.__file__))
204-
205-
if 'dev' in numpy.__version__:
206-
return "http://github.com/numpy/numpy/blob/master/numpy/%s%s" % (
207-
fn, linespec)
208-
else:
209-
return "http://github.com/numpy/numpy/blob/v%s/numpy/%s%s" % (
210-
numpy.__version__, fn, linespec)
211149
# If false, no module index is generated.
212150
#html_domain_indices = True
213151

@@ -352,5 +290,5 @@ def linkcode_resolve(domain, info):
352290

353291
fn = relpath(fn, start=dirname(nmrglue.__file__))
354292

355-
return "http://github.com/jjhelmus/nmrglue/blob/master/nmrglue/%s%s" % (
293+
return "http://github.com/jjhelmus/nmrglue/blob/v0.4/nmrglue/%s%s" % (
356294
fn, linespec)

nmrglue/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
from util import *
44
from analysis import *
55

6-
__version__ = '0.4-dev'
6+
__version__ = '0.4'

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
setup(
1414
name='nmrglue',
15-
version='0.3',
15+
version='0.4',
1616
author = 'Jonathan J. Helmus',
1717
author_email = '[email protected]',
1818
packages=['nmrglue','nmrglue.fileio','nmrglue.analysis','nmrglue.process',

0 commit comments

Comments
 (0)