Remove base32z encoding
We have pyoxenc for that instead.
This commit is contained in:
parent
4bf412905a
commit
f62fa4916f
4
setup.py
4
setup.py
|
@ -3,7 +3,7 @@ from setuptools import setup
|
|||
# Available at setup time due to pyproject.toml
|
||||
from pybind11.setup_helpers import Pybind11Extension, build_ext
|
||||
|
||||
__version__ = "1.0.2"
|
||||
__version__ = "1.0.3"
|
||||
|
||||
# Note:
|
||||
# Sort input source files if you glob sources to ensure bit-for-bit
|
||||
|
@ -11,7 +11,7 @@ __version__ = "1.0.2"
|
|||
|
||||
ext_modules = [Pybind11Extension(
|
||||
"oxenmq",
|
||||
["src/bencode.cpp", "src/module.cpp", "src/oxenmq.cpp"],
|
||||
["src/oxenmq.cpp"],
|
||||
cxx_std=17,
|
||||
libraries=["oxenmq"],
|
||||
),
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
#include "common.hpp"
|
||||
#include "oxenmq/base32z.h"
|
||||
|
||||
namespace oxenmq {
|
||||
|
||||
void BEncode_Init(py::module& mod) {
|
||||
mod.def("base32z_encode", [](py::bytes data) {
|
||||
char* ptr = nullptr;
|
||||
py::ssize_t sz = 0;
|
||||
PyBytes_AsStringAndSize(data.ptr(), &ptr, &sz);
|
||||
return oxenmq::to_base32z(ptr, ptr+sz);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
#pragma once
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <pybind11/stl.h>
|
||||
#include <pybind11/functional.h>
|
||||
|
||||
namespace py = pybind11;
|
||||
|
||||
namespace oxenmq {
|
||||
|
||||
void OxenMQ_Init(py::module &mod);
|
||||
void BEncode_Init(py::module & mod);
|
||||
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
#include "common.hpp"
|
||||
|
||||
PYBIND11_MODULE(oxenmq, m) {
|
||||
oxenmq::OxenMQ_Init(m);
|
||||
oxenmq::BEncode_Init(m);
|
||||
}
|
|
@ -1,4 +1,3 @@
|
|||
#include "common.hpp"
|
||||
#include <chrono>
|
||||
#include <exception>
|
||||
#include <oxenmq/oxenmq.h>
|
||||
|
@ -14,6 +13,8 @@
|
|||
#include <memory>
|
||||
#include <variant>
|
||||
|
||||
namespace py = pybind11;
|
||||
|
||||
namespace oxenmq {
|
||||
|
||||
// Convert a py::object containing a str, bytes, or iterable over str/bytes to a vector of message
|
||||
|
@ -51,8 +52,7 @@ struct stderr_logger {
|
|||
}
|
||||
};
|
||||
|
||||
void
|
||||
OxenMQ_Init(py::module& mod)
|
||||
PYBIND11_MODULE(oxenmq, mod)
|
||||
{
|
||||
using namespace pybind11::literals;
|
||||
constexpr py::kw_only kwonly{};
|
||||
|
|
Loading…
Reference in New Issue