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
1faf1132
Commit
1faf1132
authored
Apr 11, 2012
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Included license text in project description.
parent
cf08262d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
4 deletions
+30
-4
setup.py
+30
-4
No files found.
setup.py
View file @
1faf1132
...
...
@@ -2,7 +2,7 @@
# coding: utf-8
"""
This script supports distributing
p
ystache and testing it from a source distribution.
This script supports distributing
P
ystache and testing it from a source distribution.
Below are instructions to pystache maintainers on how to push a new
version of pystache to PyPI--
...
...
@@ -54,8 +54,29 @@ else:
# TODO: use the logging module instead of printing.
print
(
"Using: version
%
s of
%
s"
%
(
repr
(
dist
.
__version__
),
repr
(
dist
)))
VERSION
=
'0.5.1-alpha'
# Also change in pystache/init.py.
HISTORY_PATH
=
'HISTORY.rst'
LICENSE_PATH
=
'LICENSE'
README_PATH
=
'README.rst'
def
read
(
path
):
"""
Read and return the contents of a text file as a unicode string.
"""
# This function implementation was chosen to be compatible across Python 2/3.
f
=
open
(
path
,
'rb'
)
# We avoid use of the with keyword for Python 2.4 support.
try
:
b
=
f
.
read
()
finally
:
f
.
close
()
return
b
.
decode
(
'utf-8'
)
def
publish
():
"""
...
...
@@ -70,9 +91,14 @@ def make_long_description():
Return the long description for the package.
"""
long_description
=
open
(
'README.rst'
)
.
read
()
+
'
\n\n
'
+
open
(
'HISTORY.rst'
)
.
read
()
license
=
"""
\
License
=======
"""
+
read
(
LICENSE_PATH
)
return
long_description
sections
=
[
read
(
README_PATH
),
read
(
HISTORY_PATH
),
license
]
return
'
\n\n
'
.
join
(
sections
)
if
sys
.
argv
[
-
1
]
==
'publish'
:
...
...
@@ -94,7 +120,7 @@ else:
extra
=
{
# Causes 2to3 to be run during the build step.
'use_2to3'
:
True
,
'convert_2to3_doctests'
:
[
'README.rst'
],
'convert_2to3_doctests'
:
[
README_PATH
],
}
# We use the package simplejson for older Python versions since Python
...
...
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