kopia lustrzana https://github.com/crflynn/voting
add setup.py
rodzic
ce63138eab
commit
2962ca5549
|
@ -0,0 +1,46 @@
|
||||||
|
"""Setup."""
|
||||||
|
import io
|
||||||
|
from os import path
|
||||||
|
from setuptools import setup
|
||||||
|
|
||||||
|
|
||||||
|
here = path.abspath(path.dirname(__file__))
|
||||||
|
|
||||||
|
# io.open for py27
|
||||||
|
with io.open(path.join(here, "README.rst"), encoding="utf-8") as f:
|
||||||
|
long_description = f.read()
|
||||||
|
|
||||||
|
# import __version__ attributes
|
||||||
|
about = {}
|
||||||
|
with open(path.join(here, "voting", "__version__.py")) as f:
|
||||||
|
exec(f.read(), about)
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name=about["__title__"],
|
||||||
|
version=about["__version__"],
|
||||||
|
description=about["__description__"],
|
||||||
|
long_description=long_description,
|
||||||
|
url=about["__url__"],
|
||||||
|
author=about["__author__"],
|
||||||
|
author_email=about["__author_email__"],
|
||||||
|
license=about["__license__"],
|
||||||
|
classifiers=[
|
||||||
|
"Development Status :: 3 - Alpha",
|
||||||
|
"License :: OSI Approved :: MIT License",
|
||||||
|
"Intended Audience :: Science/Research",
|
||||||
|
"Natural Language :: English",
|
||||||
|
"Programming Language :: Python :: 2",
|
||||||
|
"Programming Language :: Python :: 2.7",
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"Programming Language :: Python :: 3.4",
|
||||||
|
"Programming Language :: Python :: 3.5",
|
||||||
|
"Programming Language :: Python :: 3.6",
|
||||||
|
"Programming Language :: Python :: Implementation :: CPython",
|
||||||
|
"Topic :: Scientific/Engineering",
|
||||||
|
"Topic :: Scientific/Engineering :: Mathematics",
|
||||||
|
],
|
||||||
|
keywords="voting disproportionality apportionment diversity election",
|
||||||
|
packages=["voting"],
|
||||||
|
include_package_data=True,
|
||||||
|
zip_safe=False
|
||||||
|
)
|
|
@ -167,7 +167,7 @@ def vinton(votes, seats):
|
||||||
def webster(votes, seats):
|
def webster(votes, seats):
|
||||||
"""Apportion seats using the Webster method.
|
"""Apportion seats using the Webster method.
|
||||||
|
|
||||||
Identical to the Sainte-Lague method.
|
Known also as the Sainte-Lague method.
|
||||||
|
|
||||||
:param list votes: a list of vote counts
|
:param list votes: a list of vote counts
|
||||||
:param int seats: the number of seats to apportion
|
:param int seats: the number of seats to apportion
|
||||||
|
|
Ładowanie…
Reference in New Issue