netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Eric Garver <eric@garver.life>,
	Shekhar Sharma <shekhar250198@gmail.com>,
	netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft v4] tests: py: fix python3
Date: Wed, 29 May 2019 09:37:02 +0200	[thread overview]
Message-ID: <20190529073702.uwg3h3skx33qru37@salvia> (raw)
In-Reply-To: <20190528133206.swz6y52fc7c2pp2c@egarver.localdomain>

On Tue, May 28, 2019 at 09:32:06AM -0400, Eric Garver wrote:
> On Fri, May 24, 2019 at 09:46:05PM +0200, Pablo Neira Ayuso wrote:
> > On Fri, May 24, 2019 at 09:36:00PM +0200, Pablo Neira Ayuso wrote:
> > > On Thu, May 23, 2019 at 11:56:22PM +0530, Shekhar Sharma wrote:
> > > > This version of the patch converts the file into python3 and also uses
> > > > .format() method to make the print statments cleaner.
> > > 
> > > Applied, thanks.
> > 
> > Hm.
> > 
> > I'm hitting this here after applying this:
> > 
> > # python nft-test.py
> > Traceback (most recent call last):
> >   File "nft-test.py", line 17, in <module>
> >     from nftables import Nftables
> > ImportError: No module named nftables
> 
> Did you build nftables --with-python-bin ? The error can occur if you
> built nftables against a different python version. e.g. built for
> python3, but the "python" executable is python2.

Thanks for explaining.

When running:

        ./configure --help

it shows this:

  --enable-python         Enable python

If I use it, I get this:

nft configuration:
  cli support:                  yes
  enable debugging symbols:     yes
  use mini-gmp:                 no
  enable man page:              yes
  libxtables support:           yes
  json output support:          yes
  enable Python:                yes (with yes) <------

$ make
...
setup.py build --build-base /home/pablo/devel/scm/git-netfilter/nftables/py
setup.py build --build-base /home/pablo/devel/scm/git-netfilter/nftables/py
setup.py build --build-base /home/pablo/devel/scm/git-netfilter/nftables/py
...
(forever loop)

so it indeed uses 'yes' :-)

same effect in case I specify --with-python-bin with no path, ie.

./configure --with-python-bin --with-xtables --enable-python --with-json

Thanks!

  parent reply	other threads:[~2019-05-29  7:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23 18:26 [PATCH nft v4] tests: py: fix python3 Shekhar Sharma
2019-05-23 19:10 ` Eric Garver
2019-05-24 19:36 ` Pablo Neira Ayuso
2019-05-24 19:46   ` Pablo Neira Ayuso
2019-05-28 13:32     ` Eric Garver
2019-05-28 13:39       ` Eric Garver
2019-05-28 14:03         ` shekhar sharma
2019-05-29  7:37       ` Pablo Neira Ayuso [this message]
2019-05-30 21:52         ` Eric Garver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190529073702.uwg3h3skx33qru37@salvia \
    --to=pablo@netfilter.org \
    --cc=eric@garver.life \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=shekhar250198@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).