From f74cce96cb3b4dd1bdc616a2fc9db3fc96e678ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Sun, 20 Oct 2013 02:04:27 +0200 Subject: [PATCH] Melt INSTALL.txt, THANKS and README.txt to new README.rst. Change metadate for portable version. --- .gitignore | 1 + AUTHORS | 2 +- INSTALL.txt | 243 ---------------- MANIFEST.in | 4 +- README.rst | 319 ++++++++++++++++++++++ README.txt | 112 -------- THANKS | 104 ------- extras/win32-portable/prepare_portable.py | 45 +-- setup.py | 2 +- 9 files changed, 348 insertions(+), 484 deletions(-) delete mode 100644 INSTALL.txt create mode 100644 README.rst delete mode 100644 README.txt delete mode 100644 THANKS diff --git a/.gitignore b/.gitignore index d56d1115a..0843c2245 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ *~ # Virtual Environment +.virtualenv/* .venv/* # Development settings and database diff --git a/AUTHORS b/AUTHORS index ba588d539..866c452df 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,7 +2,7 @@ Authors of OpenSlides in chronological order of first contribution: Emanuel Schütze Oskar Hahn - Norman Jäckel + Norman Jäckel René Köcher Andy Kittner Moira Brülisauer (French translation) diff --git a/INSTALL.txt b/INSTALL.txt deleted file mode 100644 index 654fbe443..000000000 --- a/INSTALL.txt +++ /dev/null @@ -1,243 +0,0 @@ -================================================ - Installation instructions for OpenSlides 1.4.3 -================================================ - -Content -======= - -I. Installation on GNU/Linux and MacOSX using the Python Package Index (PyPI) -II. Installation on GNU/Linux and MacOSX using the package from openslides.org -III. Installation on GNU/Linux and MacOSX using the sources (for development) -IV. Installation on Windows using the Python Package Index (PyPI) - -If you need help ask on OpenSlides users mailing list. -See http://openslides.org for more information. - - -I. Installation on GNU/Linux and MacOSX using the Python Package Index (PyPI) -=============================================================================== - - 1. Check requirements: - - Make sure that you have installed Python Programming Language 2 - (>= 2.6) on your system. You will also need the Python - development headers. - - E. g. for Ubuntu run: - $ sudo apt-get install python-dev - - 2. Setup a virtual environment with Virtual Python Environment builder (optional): - - You can setup a virtual environment to install OpenSlides as - non-root user. - - Make sure that you have installed Virtual Python Environment builder - on your system. - - E. g. for Ubuntu run: - $ sudo apt-get install python-virtualenv - - To setup and activate the virtual environment, create your - OpenSlides directory, change to it and run: - - $ virtualenv .venv - $ source .venv/bin/activate - - 3. Install OpenSlides: - - $ pip install openslides - - OpenSlides will install the following required python packages: - + Django - + django-mptt - + reportlab - + pillow - + qrcode - + tornado - + bleach - + beautifulsoup4 - + html5lib - - 4. Start OpenSlides server and open URL in your default browser: - - $ openslides - - If you run this command the first time a new database and the - admin account are created. Please change the password after - first login! - - Username: admin - Password: admin - - Use 'openslides --help' to show all start options. - - 5. Restart OpenSlides: - - To restart OpenSlides after closing the terminal activate the - virtual environment before starting the server: - - $ source .venv/bin/activate - $ openslides - - -II. Installation on GNU/Linux and MacOSX using the package from openslides.org -=============================================================================== - - 1. Get OpenSlides: - - Download latest OpenSlides release from http://openslides.org as - compressed tar archive. - - 2. Follow the same steps as in I. but use in step 3. - - $ pip install openslides-1.4.1.tar.gz - - instead of $ pip install openslides. - - -III. Installation on GNU/Linux and MacOSX using the sources (for development) -============================================================================= - - 1. Check requirements: - - Make sure that you have installed Python Programming Language 2 - (>= 2.6) on your system. You will also need the Python - development headers. - - E. g. for Ubuntu run: - $ sudo apt-get install python-dev - - 2. Get OpenSlides: - - Clone current master version from OpenSlides' GitHub repository - https://github.com/OpenSlides/OpenSlides. This requires Git - (see http://git-scm.com/). - - E. g. for Ubuntu run: - $ sudo apt-get install git - $ git clone git://github.com/OpenSlides/OpenSlides.git - - 3. Setup a virtual environment with Virtual Python Environment builder (optional): - - You can setup a virtual environment to install OpenSlides as - non-root user. - - Make sure that you have installed Virtual Python Environment builder - on your system. - - E. g. for Ubuntu run: - $ sudo apt-get install python-virtualenv - - To setup and activate the virtual environment go to the - (extracted/cloned) root directory of OpenSlides and run: - - $ virtualenv .venv - $ source .venv/bin/activate - - 4. Install all required python packages: - - $ pip install -r requirements.txt - - 5. Start OpenSlides server and open URL in your default browser: - - $ python start.py - - If you run this script the first time a new database and the - admin account will be created. Please change the password after - first login! - - Username: admin - Password: admin - - Use 'python start.py --help' to show all start options. - - 6. Restart OpenSlides: - - To restart OpenSlides after closing the terminal activate the - virtual environment before starting the server: - - $ source .venv/bin/activate - $ python start.py - - -IV. Installation on Windows using the Python Package Index (PyPI) -================================================================== - -NOTE: There is a portable version of OpenSlides for Windows which does not -required any install steps! If there is a reason that you can not use the -portable version you should run the following install steps. - - 1. Install requirements: - - The OpenSlides install requires following programs, which should be - installed first: - + Python Programming Language 2 (>= 2.6) - + Setuptools - - a) Download and run 32-bit MSI installer from http://www.python.org/: - - http://www.python.org/ftp/python/2.7.5/python-2.7.5.msi - - Note that the 32-bit MSI installer is required even on a 64-bit - Windows system. If you use the 64-bit MSI installer, step 3 of this - instruction will fail unless you installed the packages reportlab - and pillow manually. - - b) Add python dirs to PATH (via Control Panel > System > Advanced): - - ";C:\Python27;C:\Python27\Scripts" - - Note that the path can differ if you customized the install of - Python in step a). - - c) Download the install script ez_setup.py for Setuptools 0.7.7 from - https://pypi.python.org/pypi/setuptools/0.7.7#windows and run (via - double click). - - 2. Setup a virtual environment with Virtual Python Environment builder (optional): - - You can setup a virtual environment to install OpenSlides as - non-root user. - - To install Virtual Python Environment builder, open command line - (cmd) and run: - - > easy_install https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.9.1.tar.gz - - To setup and activate the virtual environment, create your - OpenSlides directory, open command line (cmd), change to the - directory and run: - - > virtualenv .venv - > .venv\Scripts\activate - - 3. Install OpenSlides: - - Run on command line (cmd): - - > easy_install openslides - - OpenSlides will install all required python packages. - - 4. Start OpenSlides server and open URL in your default browser: - - Run on command line (cmd): - - > openslides - - If you run this script the first time a new database and the - admin account are created. Please change the password after - first login! - - Username: admin - Password: admin - - Use 'openslides --help' to show all start options. - - 5. Restart OpenSlides: - - To restart OpenSlides after closing the command line activate the - virtual environment before starting the server: - - > .venv/Scripts/activate - > openslides diff --git a/MANIFEST.in b/MANIFEST.in index b3fb852c5..c86427e6b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,9 +1,7 @@ include AUTHORS include CHANGELOG -include INSTALL.txt include LICENSE -include README.txt -include THANKS +include README.rst include requirements_production.txt recursive-include openslides *.* recursive-exclude openslides *.pyc diff --git a/README.rst b/README.rst new file mode 100644 index 000000000..61235d761 --- /dev/null +++ b/README.rst @@ -0,0 +1,319 @@ +============ + OpenSlides +============ + +I. What is OpenSlides? +====================== + +OpenSlides is a free web-based presentation and assembly system for +displaying and controlling of agenda, motions and elections of an assembly. +See http://openslides.org/ for more information. + + +II. Requirements +================ + +OpenSlides runs everywhere where Python is running (for example on +GNU/Linux, Mac or Windows (XP or newer)). On each client you need only an +actual webbrowser. + + +III. Installation +================= + +Installation on GNU/Linux or Mac OS X +------------------------------------- + +1. Check requirements + + Make sure that you have installed Python Programming Language 2 (>= 2.6) + on your system. You will also need the Python development headers. + + For example for Ubuntu run:: + + $ sudo apt-get install python-dev + +2. Setup a virtual environment with Virtual Python Environment builder + (optional) + + You can setup a virtual environment to install OpenSlides as non-root + user. Make sure that you have installed Virtual Python Environment + builder on your system. + + For example for Ubuntu run:: + + $ sudo apt-get install python-virtualenv + + Create your OpenSlides directory, change to it, setup and activate the + virtual environment:: + + $ mkdir OpenSlides + $ cd OpenSlides + $ virtualenv .virtualenv + $ source .virtualenv/bin/activate + +3. Install OpenSlides + + To use the Python Package Index (PyPI) simply run:: + + $ pip install openslides + + You can also use the package from the `OpenSlides Website + `_. Download latest OpenSlides release + as compressed tar archive and run:: + + $ pip install openslides-x.x.tar.gz + + OpenSlides will install all required python packages (see + requirements_production.txt). + + +Installation on Windows +----------------------- + +*Note: There is a portable version of OpenSlides for Windows which does not +required any install steps. If there is a reason that you can not use the +portable version you should observe the following install steps.* + +1. Check requirements + + Make sure that you have installed Python Programming Language 2 (>= 2.6) + and Setuptools on your system. + + a. Download and run the `Python 32-bit MSI installer + `_. Note + that the 32-bit MSI installer is required even on a 64-bit Windows + system. If you use the 64-bit MSI installer, step 3 of this + instruction will fail unless you installed the packages reportlab and + pillow manually. + + b. Add python directories to PATH (via Control Panel > System > + Advanced): ``";C:\\Python27;C:\\Python27\\Scripts"``. Note that the path + can differ if you customized the install of Python in the first step. + + c. Download and run (via double click) the `install script ez_setup.py + for Setuptools 0.7.7 + `_. + +2. Setup a virtual environment with Virtual Python Environment builder + (optional) + + You can setup a virtual environment to install OpenSlides as non-root + user. Make sure that you have installed Virtual Python Environment + builder on your system. + + To install Virtual Python Environment builder, open command line (cmd) + and run:: + + > easy_install https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.10.1.tar.gz + + Create your OpenSlides directory, change to it, setup and activate the + virtual environment:: + + > md OpenSlides + > cd OpenSlides + > virtualenv .virtualenv + > .virtualenv\Scripts\activate + +3. Install OpenSlides + + To use the Python Package Index (PyPI) simply run on command line (cmd):: + + > easy_install openslides + + You can also use the package from the `OpenSlides Website + `_. Download latest OpenSlides release + as compressed tar archive and run:: + + > easy_install openslides-x.x.tar.gz + + OpenSlides will install all required python packages (see + requirements_production.txt). + + +IV. Start +========= + +To start OpenSlides simply run on command line:: + + openslides + +If you run this command the first time, a new database and the admin account +(Username: `admin`) will be created. Please change the password (Password: +`admin`) after first login! + +OpenSlides will start using the integrated Tornado webserver. It will also +try to open the webinterface in your default webbrowser. The server will +try to listen on the local ip address on port 80 or port 8000 if you do not +have admin permissions. That means that the server will be available to +everyone on your local network (at least for commonly used network +configurations). + +If you use a virtual environment (see install instructions, step 2), do not +forget to activate the environment before restart after you have closed the +terminal. + +For Unix and Mac OS X run:: + + $ source .virtualenv/bin/activate + +For Windows run:: + + > .virtualenv\Scripts\activate + +To get help on the command line options run:: + + openslides --help + + +V. Development +============== + +If you want to join us developing OpenSlides, have a look at `GitHub +`_ or write an email to our +`mailing list `_. + + +Installation and start of the development version +------------------------------------------------- + +1. Check requirements + + Follow step 1 in the correspondent instruction in section III. + +2. Get OpenSlides source code + + Clone current master version from `OpenSlides' GitHub repository + `_. This requires `Git + `_. + + For example for Ubuntu run:: + + $ sudo apt-get install git + $ git clone git://github.com/OpenSlides/OpenSlides.git + $ cd OpenSlides + + For Windows you can use GitBash:: + + > cd ... # Go to a nice place in your filesystem. + > git clone git://github.com/OpenSlides/OpenSlides.git + > cd OpenSlides + +3. Setup a virtual environment with Virtual Python Environment builder (optional) + + Follow step 2 in the correspondent instruction in section III. + +4. Install all required python packages + + For Unix and Mac OS X run:: + + $ pip install -r requirements.txt + + For Windows run:: + + > easy_install # Insert all packages from requirements.txt and requirements_production.txt here + +5. Start OpenSlides + + To start OpenSlides use the command line script:: + + python manage.py start + + To get help on the command line options run:: + + python manage.py --help + + +Coding Style +------------ + +You can find some information on the coding style in the `OpenSlides wiki +`_. + + +VI. Used software +================= + +OpenSlides uses the following projects or parts of them: + +* `Beautiful Soup `_, + License: MIT + +* `Bleach `_, License: BSD + +* `CKEditor `_, License: GPL, LGPL, MPL + +* `Django `_, License: BSD + +* `Django mptt `_, License: BSD + +* `Django haystack `_, License: BSD + +* `Pillow `_, License: Standard + PIL License + +* `qrcode `_, License: BSD + +* `ReportLab `_, + License: BSD + +* `Sphinx `_, License: BSD + +* `Sphinx Bootstrap Theme + `_, License: MIT + +* `Tornado `_, License: Apache + License v2.0 + +* `Twitter Bootstrap `_, License: Apache + License v2.0 + +* `Ubuntu TrueType Font `_, License: Ubuntu Font + Licence 1.0 + +* `Whoosh `_, License: BSD + +* `jQuery `_, License: MIT + +* jQuery Plugins: + + - `jQuery DataTables Plugin `_, License: + BSD/GPLv2 + + - `jQuery Cookie Plugin `_, + License: MIT/GPL + + - `jQuery Form Plugin `_, License: MIT/GPLv2 + + - `jQuery Once Plugin `_, License: MIT/GPL + + - `jQuery Templating Plugin + `_, License: MIT/GPLv2 + + - `jQuery bsmSelect `_, License: + MIT/GPLv2 + +* `jQuery UI `_ with custom ui components: core, + widget, mouse, sortable, datepicker, slider and css theme 'smoothness', + License: MIT + +* jQuery UI AddOns: + + - `jQuery UI Nested Sortable + `_, License: MIT + + - `jQuery UI Slider Access + `_, License: + MIT/GPLv2 + + - `jQuery timepicker addon + `_, License: MIT/GPLv2 + + +VII. License and authors +======================== + +OpenSlides is Free/Libre Open Source Software (FLOSS), and distributed +under the GNU General Public License (GNU GPL) Version 2+, see LICENSE +file. The authors of OpenSlides are mentioned in the AUTHORS file. diff --git a/README.txt b/README.txt deleted file mode 100644 index 1f51982e8..000000000 --- a/README.txt +++ /dev/null @@ -1,112 +0,0 @@ -==================================== - English README file for OpenSlides -==================================== - -This is OpenSlides, version 1.4.3 (unreleased). - - -What is OpenSlides? -=================== - -OpenSlides is a free web-based presentation and assembly system for -displaying and controlling of agenda, motions and elections of an assembly. - -See http://openslides.org for more information. - - -Getting started -=============== - -Install and start OpenSlides as described in the INSTALL.txt. - -If you need help please contact the OpenSlides team on public mailing list -or read the OpenSlides manual. See http://openslides.org. - - -The start script of OpenSlides -============================== - -Start OpenSlides ----------------- - -Simply running - openslides.exe (on Windows) -or - openslides (on Linux/MacOS) - -will start OpenSlides using the integrated Tornado webserver. It will also -try to open OpenSlides in your default webbrowser. - -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. This means that -the server will be available to everyone on your local network (at least -for commonly used network configurations). - -See `Command line options` below if you need to change this. - -The login for the default admin user after (created on first start), -is as follows: - - Username: admin - Password: admin - - -Command line options --------------------- - -The following command line options are available: - --h, --help - Show this help message and exit. - --a, --address=ADDRESS - IP Address to listen on. Default: 0.0.0.0 - --p PORT, --port=PORT - Port to listen on. Default: 8000 (start as admin/root: 80) - ---syncdb - Update/create database before starting the server. - ---backupdb=BACKUP_PATH - Make a backup copy of the database to BACKUP_PATH. - ---reset-admin - Make sure the user 'admin' exists and uses 'admin' as - password. - --s SETTINGS, --settings=SETTINGS - Set the path to the settings file. - ---no-browser - Do not automatically start web browser. - ---no-reload - Do not reload the web server. - ---no-run - Do not start the web server. - ---version - Show version and exit. - -Example 1: Openslides should only be accessible on this computer: - openslides -a 127.0.0.1 - -Example 2: Like above, but also specify the port as 8080 - openslides -a 127.0.0.01 -p 8080 - - -Supported operating systems and browsers -======================================== - -Operating Systems (OpenSlides runs anywhere where Pyhton is running): - Windows XP or newer (32 and 64bit) - MacOS X - GNU/Linux - -Browsers: - Firefox 3.6+ - IE 8+ - Chrome - Safari diff --git a/THANKS b/THANKS deleted file mode 100644 index 26d1b4f3f..000000000 --- a/THANKS +++ /dev/null @@ -1,104 +0,0 @@ -============================ - THANKS file for OpenSlides -============================ - -OpenSlides uses parts of the following projects: - -* Django - - License: BSD - -* Django mptt - - License: BSD - -* Django haystack - - License: BSD - -* jQuery - - License: MIT - and some plugins: - - jQuery DataTables Plugin - - License: BSD/GPLv2 - - jQuery Cookie Plugin - - License: MIT/GPL - - jQuery Form Plugin - - License: MIT/GPLv2 - - jQuery Once Plugin - - License: MIT/GPL - - jQuery Templating Plugin - - License: MIT/GPLv2 - - jQuery bsmSelect - - License: MIT/GPLv2 - -* jQuery UI - - with custom ui components: core, widget, mouse, sortable, datepicker, slider - and css theme 'smoothness' - License: MIT - and some addons: - - jQuery UI Nested Sortable - - License: MIT - - jQuery UI Slider Access - - License: MIT/GPLv2 - - jQuery timepicker addon - - License: MIT/GPLv2 - -* Twitter Bootstrap - - License: Apache License v2.0 - -* CKEditor - - License: GPL, LGPL, MPL - -* Beautiful Soup - - License: MIT - -* Bleach - - License: BSD - -* Pillow - - License: Standard PIL License - -* qrcode - - License: BSD - -* ReportLab - - License: BSD - -* Tornado - - License: Apache License v2.0 - -* Ubuntu TrueType Font - - License: Ubuntu Font Licence 1.0 - -* Whoosh - - License: BSD - -* Sphinx - - License: BSD - -* Sphinx Bootstrap Theme - - License: MIT diff --git a/extras/win32-portable/prepare_portable.py b/extras/win32-portable/prepare_portable.py index 9b89e0e06..9c053855d 100755 --- a/extras/win32-portable/prepare_portable.py +++ b/extras/win32-portable/prepare_portable.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- """ - :copyright: 2012 by OpenSlides team, see AUTHORS. + :copyright: 2012–2013 by OpenSlides team, see AUTHORS. :license: GNU GPL, see LICENSE for more details. """ @@ -162,16 +162,6 @@ MSVCR_PUBLIC_KEY = "1fc8b3b9a1e18e3b" MSVCR_VERSION = "9.0.21022.8" 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. -""" - OPENSLIDES_RC_TMPL = """ #include @@ -446,11 +436,11 @@ def copy_msvcr(odir): shutil.copyfile(src, dest) -def write_readme(orig_readme, outfile): - with open(orig_readme, "rU") as f: - text = [l for l in f] - - text.extend(["\n", "\n", "Included Packages\n", 17 * "=" + "\n"]) +def write_package_info_content(outfile): + """ + Writes a list of all included packages into outfile. + """ + text = ['Included Packages\n', 17 * '=' + '\n', '\n'] for pkg in sorted(SITE_PACKAGES): try: dist = pkg_resources.get_distribution(pkg) @@ -459,10 +449,19 @@ def write_readme(orig_readme, outfile): # FIXME: wxpython comes from an installer and has no distribution # see what we can do about that text.append("{0}-???\n".format(pkg)) - with open(outfile, "w") as f: f.writelines(text) - f.write(README_LICENSE_SECTION) + + +def write_metadatafile(infile, outfile): + """ + Writes content from metadata files like README, AUTHORS and LICENSE into + outfile. + """ + with open(infile, "rU") as f: + text = [l for l in f] + with open(outfile, "w") as f: + f.writelines(text) def main(): @@ -501,15 +500,21 @@ def main(): copy_dlls(odir) copy_msvcr(odir) + # Info on included packages shutil.copytree( "extras/win32-portable/licenses", - os.path.join(odir, "licenses")) + os.path.join(odir, "packages-info")) + write_package_info_content(os.path.join(odir, 'packages-info', 'PACKAGES.txt')) + + # AUTHORS, LICENSE, README + write_metadatafile('AUTHORS', os.path.join(odir, 'AUTHORS.txt')) + write_metadatafile('LICENSE', os.path.join(odir, 'LICENSE.txt')) + write_metadatafile('README.rst', os.path.join(odir, 'README.txt')) zip_fp = os.path.join( "dist", "openslides-{0}-portable.zip".format( openslides.get_version())) - write_readme("README.txt", os.path.join(odir, "README.txt")) with zipfile.ZipFile(zip_fp, "w", zipfile.ZIP_DEFLATED) as zf: for dp, dnames, fnames in os.walk(odir): diff --git a/setup.py b/setup.py index c9d6670ba..0609943a7 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ from setuptools import setup, find_packages from openslides import get_version -with open('README.txt') as readme: +with open('README.rst') as readme: long_description = readme.read()