Skip to content

Commit d2c625a

Browse files
committed
Add some metadata
1 parent b9b2766 commit d2c625a

File tree

7 files changed

+466
-2
lines changed

7 files changed

+466
-2
lines changed

CMakeLists.txt

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# pybpf_asm - Python BPF Assembler
2+
# Copyright (C) 2022 Segev Finer
3+
#
4+
# This program is free software; you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation; either version 2 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License along
15+
# with this program; if not, write to the Free Software Foundation, Inc.,
16+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17+
118
cmake_minimum_required(VERSION 3.22)
219
project(pybpf_asm)
320

LICENSE

+339
Large diffs are not rendered by default.

README.rst

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pybpf_asm
2+
=========
3+
Python BPF Assembler.
4+
5+
Based on BPF assembler in Linux sources.

bpf_asm/CMakeLists.txt

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# pybpf_asm - Python BPF Assembler
2+
# Copyright (C) 2022 Segev Finer
3+
#
4+
# This program is free software; you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation; either version 2 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License along
15+
# with this program; if not, write to the Free Software Foundation, Inc.,
16+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17+
118
if(WIN32)
219
set(FLEX_COMPILE_FLAGS "--wincompat")
320
endif()

bpf_asm/__init__.py

+25
Original file line numberDiff line numberDiff line change
@@ -1 +1,26 @@
1+
# pybpf_asm - Python BPF Assembler
2+
# Copyright (C) 2022 Segev Finer
3+
#
4+
# This program is free software; you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation; either version 2 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License along
15+
# with this program; if not, write to the Free Software Foundation, Inc.,
16+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17+
"""
18+
Python BPF Assembler.
19+
20+
Based on BPF assembler in Linux sources.
21+
"""
22+
123
from ._bpf_asm import *
24+
25+
26+
__version__ = "0.1.0"

bpf_asm/_bpf_asm.pyx

+22
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
# pybpf_asm - Python BPF Assembler
2+
# Copyright (C) 2022 Segev Finer
3+
#
4+
# This program is free software; you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation; either version 2 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License along
15+
# with this program; if not, write to the Free Software Foundation, Inc.,
16+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17+
"""
18+
Python BPF Assembler.
19+
20+
Based on BPF assembler in Linux sources.
21+
"""
22+
123
# cython: language_level=3str
224

325
import enum

setup.py

+41-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,49 @@
1+
# pybpf_asm - Python BPF Assembler
2+
# Copyright (C) 2022 Segev Finer
3+
#
4+
# This program is free software; you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation; either version 2 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License along
15+
# with this program; if not, write to the Free Software Foundation, Inc.,
16+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17+
18+
import re
119
from setuptools import find_packages
220
from skbuild import setup
321

422

23+
with open("bpf_asm/__init__.py", "r", encoding="utf-8") as f:
24+
version = re.search(r'(?m)^__version__ = u"([a-zA-Z0-9.-]+)"', f.read()).group(1)
25+
26+
with open("README.rst", "r", encoding="utf-8") as f:
27+
long_description = f.read()
28+
29+
530
setup(
631
name="bpf_asm",
7-
version="0.1.0",
8-
packages=find_packages(),
32+
version=version,
33+
author="Segev Finer",
34+
author_email="[email protected]",
35+
description="Python BPF Assembler",
36+
long_description=long_description,
37+
long_description_content_type="text/x-rst",
38+
url="https://github.com/segevfiner/pybpf_asm",
39+
project_urls={
40+
"Documentation": "https://segevfiner.github.io/pybpf_asm/",
41+
"Issue Tracker": "https://github.com/segevfiner/pybpf_asm/issues",
42+
},
43+
license="GPL-2.0-only",
44+
classifiers=[], # TODO
45+
keywords="bpf",
946
zip_safe=False,
47+
packages=find_packages(),
48+
python_requires='>=3.6',
1049
)

0 commit comments

Comments
 (0)