Add packaging support
This commit is contained in:
parent
2372d1bff8
commit
a936698245
|
@ -0,0 +1,8 @@
|
|||
[bumpversion]
|
||||
current_version = 0.5.0.12
|
||||
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)\.(?P<build>\d+)
|
||||
serialize = {major}.{minor}.{patch}.{build}
|
||||
|
||||
[bumpversion:file:setup.cfg]
|
||||
|
||||
[bumpversion:file:src/__init__.py]
|
6
Makefile
6
Makefile
|
@ -102,14 +102,14 @@ quiet_daemon:
|
|||
.PHONY: build
|
||||
# (TODO) Build a package
|
||||
build: dependencies clean LICENSE
|
||||
@$(PY) setup.py bdist_wheel --universal
|
||||
@$(PY) setup.py sdist
|
||||
@$(PIP) install build
|
||||
@$(PY) -m build
|
||||
|
||||
.PHONY: clean
|
||||
# Clean up after a build
|
||||
clean:
|
||||
@mkdir -p build dist
|
||||
@rm -r build dist
|
||||
@rm -r build dist *.egg-info
|
||||
|
||||
.PHONY: publish
|
||||
# (TODO) Publish new version to pypi
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[build-system]
|
||||
requires = ["setuptools"]
|
||||
build-backend = "setuptools.build_meta"
|
14
setup.cfg
14
setup.cfg
|
@ -1,13 +1,8 @@
|
|||
[bumpversion]
|
||||
current_version = 0.5.0.7
|
||||
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)\.(?P<build>\d+)
|
||||
serialize = {major}.{minor}.{patch}.{build}
|
||||
|
||||
[metadata]
|
||||
name = ManifoldMarketManager
|
||||
author = Olivia Appleton
|
||||
author_email = Liv@OliviaAppleton.com
|
||||
version = attr: ManifoldMarketManager.VERSION
|
||||
version = 0.5.0.12
|
||||
description = Tools and market management for manifold.markets
|
||||
long_description = file: README.md
|
||||
long_description_content_type = text/markdown
|
||||
|
@ -19,7 +14,7 @@ classifiers =
|
|||
Intended Audience :: Developers
|
||||
Intended Audience :: Financial and Insurance Industry
|
||||
Intended Audience :: Science/Research
|
||||
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
||||
License :: OSI Approved :: GNU Affero General Public License v3 (AGPLv3)
|
||||
Programming Language :: Python
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3 :: Only
|
||||
|
@ -39,6 +34,7 @@ packages = find:
|
|||
install_requires =
|
||||
requests
|
||||
python_requires = >=3.5
|
||||
include_package_data = True
|
||||
|
||||
[options.packages.find]
|
||||
where = src
|
||||
|
@ -60,10 +56,6 @@ telegram =
|
|||
all =
|
||||
ManifoldMarketManager[tests,github,telegram]
|
||||
|
||||
[bumpversion:file:setup.cfg]
|
||||
|
||||
[bumpversion:file:src/__init__.py]
|
||||
|
||||
[flake8]
|
||||
max-line-length = 120
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
from setuptools import setup
|
||||
|
||||
if __name__ == '__main__':
|
||||
setup()
|
BIN
src.png
BIN
src.png
Binary file not shown.
Before Width: | Height: | Size: 320 KiB After Width: | Height: | Size: 318 KiB |
|
@ -60,7 +60,7 @@ class Rule(ABC, DictDeserializable):
|
|||
if val == "CANCEL":
|
||||
ret += "CANCEL)\n"
|
||||
return ret
|
||||
if market.market.outcomeType == "BINARY":
|
||||
if isinstance(val, bool) or market.market.outcomeType == "BINARY":
|
||||
if val is True or val == 100:
|
||||
ret += "YES)\n"
|
||||
elif not val:
|
||||
|
@ -90,7 +90,7 @@ register_converter("Rule", loads)
|
|||
register_adapter(market.Market, dumps)
|
||||
register_converter("Market", loads)
|
||||
|
||||
VERSION = "0.5.0.7"
|
||||
VERSION = "0.5.0.12"
|
||||
__version_info__ = tuple(int(x) for x in VERSION.split('.'))
|
||||
__all__ = [
|
||||
"__version_info__", "get_client", "market", "require_env", "rule", "util", "Market", "DoResolveRule",
|
||||
|
@ -120,7 +120,7 @@ if getenv("DEBUG"):
|
|||
sys.excepthook = info
|
||||
|
||||
# dynamically load optional plugins where able to
|
||||
exempt = ('__init__', '__main__', '__pycache__', 'application', 'test', 'PyManifold', *__all__)
|
||||
exempt = ('__init__', '__main__', '__pycache__', '__version__', 'application', 'test', 'PyManifold', *__all__)
|
||||
for entry in Path(__file__).parent.iterdir():
|
||||
name = entry.name.rstrip(".py")
|
||||
if name.startswith('.') or name in exempt:
|
||||
|
|
Loading…
Reference in New Issue