Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pystache_custom
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pystache_custom
Commits
6d2f1b48
Commit
6d2f1b48
authored
Apr 10, 2012
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Got tox working with Python 2.4 through 3.2 (2.4, 2.5, 2.6, 2.7, 3.2).
parent
f124d46e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
9 deletions
+83
-9
pystache/init.py
+2
-1
setup.py
+45
-8
tox.ini
+36
-0
No files found.
pystache/init.py
View file @
6d2f1b48
...
...
@@ -9,8 +9,9 @@ from pystache.renderer import Renderer
from
pystache.template_spec
import
TemplateSpec
__all__
=
[
'render'
,
'Renderer'
,
'TemplateSpec'
]
__all__
=
[
'
__version__'
,
'
render'
,
'Renderer'
,
'TemplateSpec'
]
__version__
=
'0.5.0-rc'
# Also change in setup.py.
def
render
(
template
,
context
=
None
,
**
kwargs
):
"""
...
...
setup.py
View file @
6d2f1b48
...
...
@@ -38,15 +38,22 @@ as described here, for example:
import
os
import
sys
try
:
py_version
=
sys
.
version_info
# Distribute works with Python 2.3.5 and above:
# http://packages.python.org/distribute/setuptools.html#building-and-distributing-packages-with-distribute
if
py_version
<
(
2
,
3
,
5
):
import
distutils
as
dist
from
distutils
import
core
setup
=
core
.
setup
else
:
import
setuptools
as
dist
except
ImportError
:
from
distutils
import
core
as
dist
setup
=
dist
.
setup
# TODO: use the logging module instead.
# TODO: use the logging module instead
of printing
.
print
(
"Using: version
%
s of
%
s"
%
(
repr
(
dist
.
__version__
),
repr
(
dist
)))
setup
=
dist
.
setup
VERSION
=
'0.5.0-rc'
# Also change in pystache/init.py.
def
publish
():
...
...
@@ -80,7 +87,7 @@ template_files = ['*.mustache', '*.txt']
#
# http://packages.python.org/distribute/python3.html#note-on-compatibility-with-setuptools
#
if
sys
.
version_info
<
(
3
,
):
if
py_version
<
(
3
,
):
extra
=
{}
else
:
extra
=
{
...
...
@@ -89,6 +96,35 @@ else:
'convert_2to3_doctests'
:
[
'README.rst'
],
}
# We use the package simplejson for older Python versions since Python
# does not contain the module json before 2.6:
#
# http://docs.python.org/library/json.html
#
# Moreover, simplejson stopped officially support for Python 2.4 in version 2.1.0:
#
# https://github.com/simplejson/simplejson/blob/master/CHANGES.txt
#
requires
=
[]
if
py_version
<
(
2
,
5
):
requires
.
append
(
'simplejson<2.1'
)
elif
py_version
<
(
2
,
6
):
requires
.
append
(
'simplejson'
)
else
:
requires
.
append
(
'pyyaml'
)
INSTALL_REQUIRES
=
requires
PACKAGES
=
[
'pystache'
,
# The following packages are only for testing.
'examples'
,
'pystache.tests'
,
'pystache.tests.data'
,
'pystache.tests.data.locator'
]
setup
(
name
=
'pystache'
,
version
=
'0.5.0-rc'
,
license
=
'MIT'
,
...
...
@@ -98,7 +134,8 @@ setup(name='pystache',
author_email
=
'chris@ozmm.org'
,
maintainer
=
'Chris Jerdonek'
,
url
=
'http://github.com/defunkt/pystache'
,
packages
=
dist
.
find_packages
(),
install_requires
=
INSTALL_REQUIRES
,
packages
=
PACKAGES
,
package_data
=
{
# Include the README so doctests can be run.
# TODO: is there a better way to include the README?
...
...
tox.ini
0 → 100644
View file @
6d2f1b48
# A tox configuration file to test across multiple Python versions.
#
# http://pypi.python.org/pypi/tox
#
[tox]
envlist
=
py32,py31,py27,py26,py25,py24
[testenv]
deps
=
# Distribute works with Python 2.3.5 and above:
# http://packages.python.org/distribute/setuptools.html#building-and-distributing-packages-with-distribute
distribute
commands
=
python
setup.py
--quiet
test
# We use nosetests for older versions of Python to find doctests because
# the load_tests protocol (which we use for finding doctests when using
# Distribute's `test`) was not introduced until Python 2.7.
[testenv:py26]
deps
=
nose
commands
=
python
setup.py
--quiet
nosetests
[testenv:py25]
deps
=
nose
commands
=
python
setup.py
--quiet
nosetests
[testenv:py24]
deps
=
nose
commands
=
python
setup.py
--quiet
nosetests
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment