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
17 changes: 14 additions & 3 deletions .dir-locals.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
; A list of (major-mode . ((var1 . value1) (var2 . value2)))
; Mode can be nil, which gives default values.

((nil . ((indent-tabs-mode . nil)
(c-basic-offset . 4)))
)
; NOTE: If you update this file make sure to update .editorconfig too.

((c-mode . ((fill-column . 109)
(c-basic-offset . 8)
(eval . (c-set-offset 'substatement-open 0))
(eval . (c-set-offset 'statement-case-open 0))
(eval . (c-set-offset 'case-label 0))
(eval . (c-set-offset 'arglist-intro '++))
(eval . (c-set-offset 'arglist-close 0))
(eval . (c-set-offset 'arglist-cont-nonempty '(c-lineup-gcc-asm-reg c-lineup-arglist)))))
(meson-mode . ((meson-indent-basic . 8)))
(nil . ((indent-tabs-mode . nil)
(tab-width . 8)
(fill-column . 79))) )
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.[ch] whitespace=tab-in-indent,trailing-space
*.py whitespace=tab-in-indent,trailing-space
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

PYTHON = python
SED = sed
ETAGS = etags
Expand Down
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

# -*- coding: utf-8 -*-
#
# python-systemd documentation build configuration file, created by
Expand Down
2 changes: 2 additions & 0 deletions docs/daemon.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. SPDX-License-Identifier: LGPL-2.1-or-later

`systemd.daemon` module
=======================

Expand Down
2 changes: 2 additions & 0 deletions docs/id128.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. SPDX-License-Identifier: LGPL-2.1-or-later

`systemd.id128` module
======================

Expand Down
6 changes: 3 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. python-systemd documentation master file, created by
.. SPDX-License-Identifier: LGPL-2.1-or-later

.. python-systemd documentation main file, created by
sphinx-quickstart on Sat Feb 9 13:49:42 2013.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

.. _index:

Expand Down
2 changes: 2 additions & 0 deletions docs/journal.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. SPDX-License-Identifier: LGPL-2.1-or-later

`systemd.journal` module
========================

Expand Down
2 changes: 2 additions & 0 deletions docs/login.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. SPDX-License-Identifier: LGPL-2.1-or-later

`systemd.login` module
=======================

Expand Down
5 changes: 3 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

project(
'python-systemd',
'c',
Expand All @@ -18,5 +20,4 @@ common_c_args = [
'-DLIBSYSTEMD_VERSION=@0@'.format(libsystemd_dep.version()),
]

subdir('src')

subdir('src/systemd')
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

[project]
name = "systemd-python"
dynamic = ["version"]
Expand Down
1 change: 0 additions & 1 deletion src/meson.build

This file was deleted.

2 changes: 2 additions & 0 deletions src/systemd/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id128-constants.h generated
id128-defines.h generated
16 changes: 1 addition & 15 deletions src/systemd/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# -*- Mode: python; indent-tabs-mode: nil -*- */
#
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# Copyright 2012 David Strauss
#
# python-systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# python-systemd is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with python-systemd; If not, see <http://www.gnu.org/licenses/>.
16 changes: 1 addition & 15 deletions src/systemd/_daemon.c
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/* SPDX-License-Identifier: LGPL-2.1-or-later */

/***

Copyright 2013-2016 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

python-systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

python-systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with python-systemd; If not, see <http://www.gnu.org/licenses/>.
***/

#define PY_SSIZE_T_CLEAN
Expand Down
16 changes: 1 addition & 15 deletions src/systemd/_journal.c
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/* SPDX-License-Identifier: LGPL-2.1-or-later */

/***

Copyright 2012 David Strauss <david@davidstrauss.net>

python-systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

python-systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with python-systemd; If not, see <http://www.gnu.org/licenses/>.
***/

#include <Python.h>
Expand Down
16 changes: 1 addition & 15 deletions src/systemd/_reader.c
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/* SPDX-License-Identifier: LGPL-2.1-or-later */

/***

Copyright 2013 Steven Hiscocks, Zbigniew Jędrzejewski-Szmek

python-systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

python-systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with python-systemd; If not, see <http://www.gnu.org/licenses/>.
***/

#define PY_SSIZE_T_CLEAN
Expand Down
2 changes: 2 additions & 0 deletions src/systemd/daemon.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

from socket import AF_UNSPEC as _AF_UNSPEC

from ._daemon import (__version__,
Expand Down
16 changes: 1 addition & 15 deletions src/systemd/id128.c
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/* SPDX-License-Identifier: LGPL-2.1-or-later */

/***

Copyright 2013 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

python-systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

python-systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with python-systemd; If not, see <http://www.gnu.org/licenses/>.
***/

#include <Python.h>
Expand Down
19 changes: 1 addition & 18 deletions src/systemd/journal.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
# -*- Mode: python; coding:utf-8; indent-tabs-mode: nil -*- */
#
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# Copyright 2012 David Strauss <david@davidstrauss.net>
# Copyright 2012 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
# Copyright 2012 Marti Raudsepp <marti@juffo.org>
#
# python-systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# python-systemd is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with python-systemd; If not, see <http://www.gnu.org/licenses/>.

from __future__ import division

import sys as _sys
import datetime as _datetime
Expand Down Expand Up @@ -480,7 +464,6 @@ def stream(identifier=None, priority=LOG_INFO, level_prefix=False):

This interface can be used conveniently with the print function:

>>> from __future__ import print_function
>>> stream = journal.stream() # doctest: +SKIP
>>> print('message...', file=stream) # doctest: +SKIP

Expand Down
16 changes: 1 addition & 15 deletions src/systemd/login.c
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/* SPDX-License-Identifier: LGPL-2.1-or-later */

/***

Copyright 2013 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

python-systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

python-systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with python-systemd; If not, see <http://www.gnu.org/licenses/>.
***/

#define PY_SSIZE_T_CLEAN
Expand Down
16 changes: 1 addition & 15 deletions src/systemd/macro.h
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/* SPDX-License-Identifier: LGPL-2.1-or-later */

#pragma once

/***

Copyright 2010 Lennart Poettering

python-systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

python-systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with python-systemd; If not, see <http://www.gnu.org/licenses/>.
***/

#define DISABLE_WARNING_MISSING_PROTOTYPES \
Expand Down
9 changes: 8 additions & 1 deletion src/systemd/meson.build
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

# Build _journal extension module
python.extension_module(
'_journal',
Expand Down Expand Up @@ -49,7 +51,12 @@ python.extension_module(
)

# Install Python modules
python.install_sources('__init__.py', 'journal.py', 'daemon.py', subdir: 'systemd')
python.install_sources(
'__init__.py',
'journal.py',
'daemon.py',
subdir: 'systemd',
)

# Install test modules
python.install_sources(
Expand Down
16 changes: 1 addition & 15 deletions src/systemd/pyutil.c
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/* SPDX-License-Identifier: LGPL-2.1-or-later */

/***

Copyright 2013 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

python-systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

python-systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with python-systemd; If not, see <http://www.gnu.org/licenses/>.
***/

#include <Python.h>
Expand Down
16 changes: 1 addition & 15 deletions src/systemd/pyutil.h
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/* SPDX-License-Identifier: LGPL-2.1-or-later */

#pragma once

/***

Copyright 2013 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

python-systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

python-systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with python-systemd; If not, see <http://www.gnu.org/licenses/>.
***/

#ifndef Py_TYPE
Expand Down
16 changes: 1 addition & 15 deletions src/systemd/strv.c
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/* SPDX-License-Identifier: LGPL-2.1-or-later */

/***

Copyright 2010 Lennart Poettering

python-systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

python-systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with python-systemd; If not, see <http://www.gnu.org/licenses/>.
***/

#include <stdlib.h>
Expand Down
Loading