Use README.txt for source distribution as well as for win32-portable

This commit is contained in:
Andy Kittner 2012-04-27 23:29:39 +02:00
parent 7b8f882f0d
commit 9d81a0b871
2 changed files with 88 additions and 93 deletions

View File

@ -1,82 +1,69 @@
English README file for OpenSlides English README file for OpenSlides
================================== ==================================
This is OpenSlides, version ${VERSION}. This is OpenSlides, version 1.2.
What is OpenSlides? What is OpenSlides?
=================== ===================
OpenSlides is a free, web-based presentation system for displaying and OpenSlides is a free, web-based presentation system for displaying and
controlling of agendas, applications and elections of an event. controlling of agendas, applications and elections of an event.
See http://www.openslides.org for more information. See http://www.openslides.org for more information.
Getting started Getting started
=============== ===============
Simply running openslides.exe will start OpenSlides using djangos Simply running openslides.exe will start OpenSlides using djangos
development server. It will also try to open OpenSlides in your development server. It will also try to open OpenSlides in your
default webbrowser. default webbrowser.
The server will listen on the IP address of your current hostname on The server will listen on the IP address of your current hostname on
port 80 (if port 80 is not available port 8000 will be used). port 80 (if port 80 is not available port 8000 will be used).
This means that the server will be available to everyone on your This means that the server will be available to everyone on your
local network (at least for commonly used network configurations). local network (at least for commonly used network configurations).
See `Command line options` below if you need to change this. See `Command line options` below if you need to change this.
The login for the default admin user after (created on first start), The login for the default admin user after (created on first start),
is as follows: is as follows:
Username: admin Username: admin
Password: admin Password: admin
Command line options Command line options
==================== ====================
The following command line options are available: The following command line options are available:
-a, --address=ADDRESS -a, --address=ADDRESS
Changes the address on which the server will listen for connections Changes the address on which the server will listen for connections
-p, --port -p, --port
Changes the port on which the server will listen for connections Changes the port on which the server will listen for connections
--syncdb --syncdb
Create/ update the database Create/ update the database
--reset-admin --reset-admin
This will reset the password of the user This will reset the password of the user
Example 1: Openslides should only be accessible on this computer: Example 1: Openslides should only be accessible on this computer:
openslides.exe -a 127.0.0.1 openslides.exe -a 127.0.0.1
Example 2: Like above, but also specify the port as 8080 Example 2: Like above, but also specify the port as 8080
openslides.exe -a 127.0.0.01 -p 8080 openslides.exe -a 127.0.0.01 -p 8080
Supported operating systems and browsers Supported operating systems and browsers
======================================== ========================================
Operating Systems: Operating Systems:
Windows XP or newe r (32 and 64bit) [use openslids.exe] Windows XP or newer (32 and 64bit) [use openslides.exe]
MacOS X MacOS X
GNU/Linux GNU/Linux
Browsers: Browsers:
Firefox 3.6+ Firefox 3.6+
IE 7+ IE 7+
Chrome Chrome
Safari Safari
Included Packages
=================
${PACKAGE_LIST}
License
=======
OpenSlides is distributed under the GNU General Public License
version 2. For details about this license and the licenses of the
bundled packages, please refer to the corresponding file in the
licenses/ directory.

View File

@ -19,7 +19,6 @@ import distutils.ccompiler
import distutils.sysconfig import distutils.sysconfig
from contextlib import nested from contextlib import nested
from string import Template
import pkg_resources import pkg_resources
@ -100,6 +99,16 @@ MSVCR_PUBLIC_KEY = "1fc8b3b9a1e18e3b"
MSVCR_VERSION = "9.0.21022.8" MSVCR_VERSION = "9.0.21022.8"
MSVCR_NAME = "Microsoft.VC90.CRT" MSVCR_NAME = "Microsoft.VC90.CRT"
README_LICENSE_SECTION = """
License
=======
OpenSlides is distributed under the GNU General Public License
version 2. For details about this license and the licenses of the
bundled packages, please refer to the corresponding file in the
licenses/ directory.
"""
def compile_re_list(patterns): def compile_re_list(patterns):
expr = "|".join("(?:{0})".format(x) for x in patterns) expr = "|".join("(?:{0})".format(x) for x in patterns)
return re.compile(expr) return re.compile(expr)
@ -261,20 +270,19 @@ def copy_msvcr(odir):
shutil.copyfile(src, dest) shutil.copyfile(src, dest)
def write_readme(template_file, outfile): def write_readme(orig_readme, outfile):
with open(template_file, "rU") as f: with open(orig_readme, "rU") as f:
tmpl = Template(f.read()) text = [l for l in f]
packages = ["openslides-{0}".format(openslides.get_version())] text.extend(["\n", "\n", "Included Packages\n", 17 * "=" + "\n"])
for pkg in SITE_PACKAGES: for pkg in sorted(SITE_PACKAGES):
dist = pkg_resources.get_distribution(pkg) dist = pkg_resources.get_distribution(pkg)
packages.append("{0}-{1}".format(dist.project_name, dist.version)) text.append("{0}-{1}\n".format(dist.project_name, dist.version))
tmpl_vars = {"PACKAGE_LIST": "\n".join(packages),
"VERSION": openslides.get_version()}
with open(outfile, "w") as f: with open(outfile, "w") as f:
f.write(tmpl.substitute(tmpl_vars)) f.writelines(text)
f.write(README_LICENSE_SECTION)
def main(): def main():
@ -312,7 +320,7 @@ def main():
zip_fp = os.path.join("dist", "openslides-{0}-portable.zip".format( zip_fp = os.path.join("dist", "openslides-{0}-portable.zip".format(
openslides.get_version())) openslides.get_version()))
write_readme("extras/win32-portable/README.txt.in", write_readme("README.txt",
os.path.join(odir, "README.txt")) os.path.join(odir, "README.txt"))
with zipfile.ZipFile(zip_fp, "w", zipfile.ZIP_DEFLATED) as zf: with zipfile.ZipFile(zip_fp, "w", zipfile.ZIP_DEFLATED) as zf: