Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ _CPack_Packages
*.deb
*egg-info
*dist-info
test_wallets
test_wallets
.github/instructions/codacy.instructions.md
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
> [!CAUTION]
>
> monero-python is without funding and needs tests to reach a stable release for production environments, expect bugs and breaking changes.
> There is a [Monero CSS proposal](https://repo.getmonero.org/monero-project/ccs-proposals/-/merge_requests/598)
> There is a [Monero CCS proposal](https://repo.getmonero.org/monero-project/ccs-proposals/-/merge_requests/598)
> for maintenance of this library, check it out!

A Python library for creating Monero applications using RPC and Python bindings to [monero v0.18.4.3 'Fluorine Fermi'](https://github.com/monero-project/monero/tree/v0.18.4.3).
Expand Down
80 changes: 40 additions & 40 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,47 @@
this_dir = Path(__file__).parent.resolve()

ext_modules = [
Pybind11Extension(
'monero',
[
'src/cpp/py_monero.cpp'
],
include_dirs=[
pybind11.get_include(),
str(this_dir / 'external' / 'monero-cpp' / 'src'),
str(this_dir / 'external' / 'monero-cpp' / 'external' / 'monero-project' / 'src'),
str(this_dir / 'external' / 'monero-cpp' / 'external' / 'monero-project' / 'contrib' / 'epee' / 'include'),
str(this_dir / 'external' / 'monero-cpp' / 'external' / 'monero-project' / 'external'),
str(this_dir / 'external' / 'monero-cpp' / 'external' / 'monero-project' / 'external' / 'easylogging++'),
str(this_dir / 'external' / 'monero-cpp' / 'external' / 'monero-project' / 'external' / 'rapidjson' / 'include'),
str(this_dir / 'src' / 'cpp'),
str(this_dir / 'src' / 'cpp' / 'common'),
str(this_dir / 'src' / 'cpp' / 'daemon'),
str(this_dir / 'src' / 'cpp' / 'wallet')
],
library_dirs=[
str(this_dir / 'external' / 'monero-cpp' / 'build')
],
libraries=['monero-cpp'],
language='c++',
extra_compile_args=['/std:c++17'] if sys.platform == "win32" else ['-std=c++17'],
),
Pybind11Extension(
'monero',
[
'src/cpp/py_monero.cpp'
],
include_dirs=[
pybind11.get_include(),
str(this_dir / 'external' / 'monero-cpp' / 'src'),
str(this_dir / 'external' / 'monero-cpp' / 'external' / 'monero-project' / 'src'),
str(this_dir / 'external' / 'monero-cpp' / 'external' / 'monero-project' / 'contrib' / 'epee' / 'include'),
str(this_dir / 'external' / 'monero-cpp' / 'external' / 'monero-project' / 'external'),
str(this_dir / 'external' / 'monero-cpp' / 'external' / 'monero-project' / 'external' / 'easylogging++'),
str(this_dir / 'external' / 'monero-cpp' / 'external' / 'monero-project' / 'external' / 'rapidjson' / 'include'),
str(this_dir / 'src' / 'cpp'),
str(this_dir / 'src' / 'cpp' / 'common'),
str(this_dir / 'src' / 'cpp' / 'daemon'),
str(this_dir / 'src' / 'cpp' / 'wallet')
],
library_dirs=[
str(this_dir / 'external' / 'monero-cpp' / 'build')
],
libraries=['monero-cpp'],
language='c++',
extra_compile_args=['/std:c++17'] if sys.platform == "win32" else ['-std=c++17'],
),
]

setup(
name='monero',
version='0.0.1',
author='everoddandeven',
author_email="everoddandeven@protonmail.com",
maintainer='everoddandeven',
maintainer_email='everoddandeven@protonmail.com',
license="MIT",
url='https://github.com/everoddandeven/monero-python',
download_url="https://github.com/everoddandeven/monero-python/releases",
description='A Python library for using Monero.',
long_description='Python bindings for monero-cpp.',
keywords=["monero", "monero-python", "python", "bindings", "pybind11"],
ext_modules=ext_modules,
install_requires=['pybind11>=2.12.0'],
cmdclass={"build_ext": build_ext}
name='monero',
version='0.0.1',
author='everoddandeven',
author_email="everoddandeven@protonmail.com",
maintainer='everoddandeven',
maintainer_email='everoddandeven@protonmail.com',
license="MIT",
url='https://github.com/everoddandeven/monero-python',
download_url="https://github.com/everoddandeven/monero-python/releases",
description='A Python library for using Monero.',
long_description='Python bindings for monero-cpp.',
keywords=["monero", "monero-python", "python", "bindings", "pybind11"],
ext_modules=ext_modules,
install_requires=['pybind11>=2.12.0'],
cmdclass={"build_ext": build_ext}
)
3 changes: 2 additions & 1 deletion src/python/monero_connection_manager_listener.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from typing import Optional
from .monero_rpc_connection import MoneroRpcConnection


Expand All @@ -8,7 +9,7 @@ class MoneroConnectionManagerListener:
def __init__(self) -> None:
"""Initialize a connection manager listener."""
...
def on_connection_changed(self, connection: MoneroRpcConnection) -> None:
def on_connection_changed(self, connection: Optional[MoneroRpcConnection]) -> None:
"""
Notified on connection change events.

Expand Down
2 changes: 1 addition & 1 deletion src/python/monero_rpc_error.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class MoneroRpcError(RuntimeError):
"""
Exception when interacting with the Monero daemon or wallet RPC API.
"""
def __init__(self, code: int, aMessage: str):
def __init__(self, code: int, aMessage: str) -> None:
...
def get_code(self) -> int:
"""
Expand Down
5 changes: 3 additions & 2 deletions src/python/monero_utils.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from typing import Any
from .monero_output_wallet import MoneroOutputWallet
from .monero_block import MoneroBlock
from .monero_transfer import MoneroTransfer
Expand All @@ -21,7 +22,7 @@ class MoneroUtils:
"""
...
@staticmethod
def binary_to_dict(bin: bytes) -> dict:
def binary_to_dict(bin: bytes) -> dict[Any, Any]:
"""
Deserialize a dictionary from binary format.

Expand All @@ -48,7 +49,7 @@ class MoneroUtils:
"""
...
@staticmethod
def dict_to_binary(dictionary: dict) -> bytes:
def dict_to_binary(dictionary: dict[Any, Any]) -> bytes:
"""
Converts a dictionary into binary format.

Expand Down
Loading
Loading