Skip to content

Commit 337956c

Browse files
committed
Merge branch 'maint'
* normalize line ends in Windows `.bat` files * fix remaining links to Anaconda Python * replace deprecated unit test method * fix data paths when running in package base * require wxpython 3 for conda package
2 parents 8af364b + fe89c00 commit 337956c

13 files changed

Lines changed: 41 additions & 39 deletions

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
/conda-recipe/ export-ignore
55
/devutils export-ignore
66
.gitarchive.cfg export-subst
7+
*.bat text eol=crlf

conda-recipe/bld.bat

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
%PYTHON% setup.py install
2-
if errorlevel 1 exit 1
3-
4-
:: Add more build steps here, if they are necessary.
5-
6-
set MENU_DIR=%PREFIX%\Menu
7-
if not exist (%MENU_DIR%) mkdir %MENU_DIR%
8-
9-
cd %RECIPE_DIR%
10-
%PYTHON% expandpdfguibase.py menu-windows.json > %MENU_DIR%\menu-windows.json
11-
if errorlevel 1 exit 1
12-
13-
copy pdfgui.ico %MENU_DIR%\
14-
if errorlevel 1 exit 1
15-
16-
:: See http://docs.continuum.io/conda/build.html
17-
:: for a list of environment variables that are set during the build process.
1+
%PYTHON% setup.py install
2+
if errorlevel 1 exit 1
3+
4+
:: Add more build steps here, if they are necessary.
5+
6+
set MENU_DIR=%PREFIX%\Menu
7+
if not exist (%MENU_DIR%) mkdir %MENU_DIR%
8+
9+
cd %RECIPE_DIR%
10+
%PYTHON% expandpdfguibase.py menu-windows.json > %MENU_DIR%\menu-windows.json
11+
if errorlevel 1 exit 1
12+
13+
copy pdfgui.ico %MENU_DIR%\
14+
if errorlevel 1 exit 1
15+
16+
:: See http://docs.continuum.io/conda/build.html
17+
:: for a list of environment variables that are set during the build process.

conda-recipe/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ requirements:
3838
- python
3939
- setuptools
4040
- matplotlib
41-
- wxpython
41+
- wxpython 3.*
4242
- menuinst [win]
4343
- diffpy.pdffit2
4444
- diffpy.structure 1.*

doc/manual/pdfgui.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/manual/pdfgui.texinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ information about DiffPy products visit the project homepage at
297297
@subsection Installation for Anaconda Python
298298

299299
As of version 1.1 PDFgui is distributed as a pre-built package for
300-
@url{https://www.continuum.io, Anaconda Python}. This method makes it
300+
@url{https://www.anaconda.com, Anaconda Python}. This method makes it
301301
easier to distribute software updates and also results in the same
302302
installation procedure on all supported platforms.
303303

src/diffpy/pdfgui/gui/pdfguiglobals.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
isAltered = False
2929

3030
# Resolve APPDATADIR base path to application data files.
31-
_upbasedir = os.path.normpath(resource_filename(__name__, '../../..'))
31+
_mydir = os.path.abspath(resource_filename(__name__, ''))
32+
_upbasedir = os.path.normpath(_mydir + '/../../..')
3233
_development_mode = (
3334
os.path.basename(_upbasedir) == "src" and
3435
os.path.isfile(os.path.join(_upbasedir, "../setup.py"))

src/diffpy/pdfgui/tests/TestCalculation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def rgriddata(calc):
7373
# range should cover the argument range.
7474
self.calc.setRGrid(1, 0.7, 10)
7575
self.assertEqual(1, self.calc.rmin)
76-
self.failUnless(10 < self.calc.rmax)
76+
self.assertTrue(10 < self.calc.rmax)
7777
self.assertEqual(0.7, self.calc.rstep)
7878
return
7979

src/diffpy/pdfgui/tests/TestConstraint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def setUp(self):
3333
def test___init__(self):
3434
"""check Constraint.__init__()
3535
"""
36-
self.failUnless(1 in self.c.parguess)
36+
self.assertTrue(1 in self.c.parguess)
3737
self.assertEqual(1, len(self.c.parguess))
3838
c1 = Constraint('2*@2 + 3.0', 13.0)
3939
self.assertEqual(1, len(c1.parguess))

src/diffpy/pdfgui/tests/TestFitDataSet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def test__resampledPDFDataSet(self):
200200
# reduce fitrmax to one half
201201
fds.fitrmax = fds.rmax / 2.0
202202
npts1 = len(fds.rcalc)
203-
self.failUnless(npts1 < npts)
203+
self.assertTrue(npts1 < npts)
204204
rds1 = fds._resampledPDFDataSet()
205205
self.assertEqual(npts1, len(rds1.robs))
206206
self.assertEqual(npts1, len(rds1.drobs))

src/diffpy/pdfgui/tests/TestFitStructure.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def test___getattr__(self):
5555
"""check FitStructure.__getattr__()
5656
"""
5757
stru = self.stru
58-
self.failUnless(stru is stru.initial)
58+
self.assertTrue(stru is stru.initial)
5959
self.assertRaises(AttributeError, eval,
6060
'stru.notdefined', locals())
6161
return
@@ -156,9 +156,9 @@ def test_insertAtoms(self):
156156
stru.insertAtoms(0, [Atom('Na', (0, 0, 0))])
157157
self.assertEqual(5, len(stru))
158158
self.assertEqual(1, len(stru.constraints))
159-
self.failUnless(cns is stru.constraints['x(3)'])
159+
self.assertTrue(cns is stru.constraints['x(3)'])
160160
stru.insertAtoms(5, [Atom('Cl', (0, 0, 0))])
161-
self.failUnless(['x(3)'] == stru.constraints.keys())
161+
self.assertTrue(['x(3)'] == stru.constraints.keys())
162162
return
163163

164164

@@ -171,10 +171,10 @@ def test_deleteAtoms(self):
171171
stru.constraints['x(2)'] = cns
172172
stru.deleteAtoms([3])
173173
self.assertEqual(['x(2)'], stru.constraints.keys())
174-
self.failUnless(cns is stru.constraints.values()[0])
174+
self.assertTrue(cns is stru.constraints.values()[0])
175175
stru.deleteAtoms([0])
176176
self.assertEqual(['x(1)'], stru.constraints.keys())
177-
self.failUnless(cns is stru.constraints.values()[0])
177+
self.assertTrue(cns is stru.constraints.values()[0])
178178
stru.deleteAtoms([0])
179179
self.assertEqual({}, stru.constraints)
180180
return

0 commit comments

Comments
 (0)