Skip to content

Commit 487316f

Browse files
committed
Merge pull request bradbeattie#12 from robinharms/master
Setuptools information
2 parents dd2e4af + f5bb00b commit 487316f

File tree

8 files changed

+94
-0
lines changed

8 files changed

+94
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*.pyc
22
*.py-e
33
*.swp
4+
*.egg-info

CHANGES.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
0.0
2+
---
3+
4+
- Initial version

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include *.txt *.rst *.markdown

README.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Python Vote Core
2+
================
3+
4+
python-vote-core implements various electoral methods, providing the results
5+
calculated off a provided set of ballots and options.
6+
7+
* Project page: http://github.com/bradbeattie/python-vote-core
8+
* Issue tracker: http://github.com/bradbeattie/python-vote-core/issues
9+
* Example usage: http://vote.cognitivesandbox.com, http://modernballots.com
10+
11+
Methods implemented
12+
-------------------
13+
14+
* Single Winner Methods
15+
* Plurality (aka first-past-the-post or fptp)
16+
* Instant-Runoff Voting (aka IRV)
17+
* Schulze Method (aka Beatpath)
18+
* Multiple Winner Methods
19+
* Plurality at large (aka block voting)
20+
* Single Transferable Vote (aka STV)
21+
* Schulze STV
22+
* Ordering Methods
23+
* Schulze Proportional Representation
24+
* Schulze Nonproportional Representation
25+
26+
Basic Usage
27+
-----------
28+
29+
print SchulzeMethod([
30+
{ "count":3, "ballot":[["A"], ["C"], ["D"], ["B"]] },
31+
{ "count":9, "ballot":[["B"], ["A"], ["C"], ["D"]] },
32+
{ "count":8, "ballot":[["C"], ["D"], ["A"], ["B"]] },
33+
{ "count":5, "ballot":[["D"], ["A"], ["B"], ["C"]] },
34+
{ "count":5, "ballot":[["D"], ["B"], ["C"], ["A"]] }
35+
], ballot_notation = "grouping").as_dict()

docs/LICENSE.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
License
2+
-------
3+
4+
Copyright (C) 2009, Brad Beattie
5+
6+
This program is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
This program is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with this program. If not, see http://www.gnu.org/licenses.

setup.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import os
2+
3+
from setuptools import setup, find_packages
4+
5+
here = os.path.abspath(os.path.dirname(__file__))
6+
README = open(os.path.join(here, 'README.rst')).read()
7+
CHANGES = open(os.path.join(here, 'CHANGES.rst')).read()
8+
LICENSE = open(os.path.join(here, 'docs', 'LICENSE.txt')).read()
9+
10+
requires = [
11+
'python-graph-core >= 1.8.0',
12+
]
13+
14+
setup(name='python-vote-core',
15+
version='0.0',
16+
description="An implementation of various election methods, most notably the Schulze Method and Schulze STV.",
17+
long_description=README + '\n\n' + CHANGES + '\n\n' + LICENSE,
18+
classifiers=[
19+
"Development Status :: 5 - Production/Stable",
20+
"License :: OSI Approved :: GNU General Public License (GPL)",
21+
"Programming Language :: Python",
22+
"Programming Language :: Python :: 2.7",
23+
"Topic :: Scientific/Engineering :: Mathematics",
24+
],
25+
author='Brad Beattie',
26+
author_email='bradbeattie@gmail com',
27+
url='https://github.com/bradbeattie/python-vote-core',
28+
license='GPLv3',
29+
keywords='library election',
30+
packages=find_packages(),
31+
include_package_data=True,
32+
zip_safe=False,
33+
install_requires = requires,
34+
tests_require= requires,
35+
test_suite="test_functionality",
36+
)

test_functionality/__init__.py

Whitespace-only changes.

test_performance/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)