DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] doc/guides: remove dependency on make build system
@ 2020-07-21 15:39 Bruce Richardson
  2020-07-21 15:42 ` Bruce Richardson
  2020-07-22 12:45 ` Thomas Monjalon
  0 siblings, 2 replies; 5+ messages in thread
From: Bruce Richardson @ 2020-07-21 15:39 UTC (permalink / raw)
  To: John McNamara, Marko Kovacevic; +Cc: dev, Bruce Richardson

When building the DPDK guide documents, the DPDK version information was
pulled using "make showversion", which meant there was a dependency on
the DPDK make-based build system. Change this to just read the data from
the VERSION file in the root directory.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
NOTE: When make build system is completed removed, we can change the
relative path to the VERSION file i.e. "../../", to instead pull the
path from "MESON_SOURCE_ROOT" in the environment, which should be more
robust.
---
 doc/guides/conf.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index 700e05e17..ff8ddc7e7 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -2,7 +2,6 @@
 # Copyright(c) 2010-2015 Intel Corporation
 
 from __future__ import print_function
-import subprocess
 from docutils import nodes
 from distutils.version import LooseVersion
 from sphinx import __version__ as sphinx_version
@@ -38,10 +37,8 @@
 html_show_copyright = False
 highlight_language = 'none'
 
-# If MAKEFLAGS is exported by the user, garbage text might end up in version
-version = subprocess.check_output(['make', '-sRrC', '../../', 'showversion'],
-                                  env=dict(environ, MAKEFLAGS=""))
-version = version.decode('utf-8').rstrip()
+with open('../../VERSION') as verfile:
+    version = verfile.readline().rstrip()
 release = version
 
 master_doc = 'index'
-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] doc/guides: remove dependency on make build system
  2020-07-21 15:39 [dpdk-dev] [PATCH] doc/guides: remove dependency on make build system Bruce Richardson
@ 2020-07-21 15:42 ` Bruce Richardson
  2020-07-22 12:45 ` Thomas Monjalon
  1 sibling, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2020-07-21 15:42 UTC (permalink / raw)
  To: John McNamara, Marko Kovacevic; +Cc: dev

On Tue, Jul 21, 2020 at 04:39:50PM +0100, Bruce Richardson wrote:
> When building the DPDK guide documents, the DPDK version information was
> pulled using "make showversion", which meant there was a dependency on
> the DPDK make-based build system. Change this to just read the data from
> the VERSION file in the root directory.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> NOTE: When make build system is completed removed, we can change the
> relative path to the VERSION file i.e. "../../", to instead pull the
> path from "MESON_SOURCE_ROOT" in the environment, which should be more
> robust.
> ---
>  doc/guides/conf.py | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/doc/guides/conf.py b/doc/guides/conf.py
> index 700e05e17..ff8ddc7e7 100644
> --- a/doc/guides/conf.py
> +++ b/doc/guides/conf.py
> @@ -2,7 +2,6 @@
>  # Copyright(c) 2010-2015 Intel Corporation
>  
>  from __future__ import print_function
> -import subprocess
>  from docutils import nodes
>  from distutils.version import LooseVersion
>  from sphinx import __version__ as sphinx_version
> @@ -38,10 +37,8 @@
>  html_show_copyright = False
>  highlight_language = 'none'
>  
> -# If MAKEFLAGS is exported by the user, garbage text might end up in version
> -version = subprocess.check_output(['make', '-sRrC', '../../', 'showversion'],
> -                                  env=dict(environ, MAKEFLAGS=""))
> -version = version.decode('utf-8').rstrip()
> +with open('../../VERSION') as verfile:
> +    version = verfile.readline().rstrip()
>  release = version
>  
>  master_doc = 'index'
> -- 

As a side-effect, this patch also allows doc building on FreeBSD, since it
no longer uses "make" command, which should be "gmake" on BSD.

/Bruce

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] doc/guides: remove dependency on make build system
  2020-07-21 15:39 [dpdk-dev] [PATCH] doc/guides: remove dependency on make build system Bruce Richardson
  2020-07-21 15:42 ` Bruce Richardson
@ 2020-07-22 12:45 ` Thomas Monjalon
  2020-07-22 12:59   ` Bruce Richardson
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2020-07-22 12:45 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: John McNamara, Marko Kovacevic, dev

21/07/2020 17:39, Bruce Richardson:
> When building the DPDK guide documents, the DPDK version information was
> pulled using "make showversion", which meant there was a dependency on
> the DPDK make-based build system. Change this to just read the data from
> the VERSION file in the root directory.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> NOTE: When make build system is completed removed, we can change the
> relative path to the VERSION file i.e. "../../", to instead pull the
> path from "MESON_SOURCE_ROOT" in the environment, which should be more
> robust.

Yes it would be a bit better.
If we merge this patch in 20.08, we'll forget about this improvement :)
I suggest waiting 20.11 to merge the definitive improvement.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] doc/guides: remove dependency on make build system
  2020-07-22 12:45 ` Thomas Monjalon
@ 2020-07-22 12:59   ` Bruce Richardson
  2020-08-20 15:54     ` Bruce Richardson
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Richardson @ 2020-07-22 12:59 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: John McNamara, Marko Kovacevic, dev

On Wed, Jul 22, 2020 at 02:45:54PM +0200, Thomas Monjalon wrote:
> 21/07/2020 17:39, Bruce Richardson:
> > When building the DPDK guide documents, the DPDK version information was
> > pulled using "make showversion", which meant there was a dependency on
> > the DPDK make-based build system. Change this to just read the data from
> > the VERSION file in the root directory.
> > 
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> > NOTE: When make build system is completed removed, we can change the
> > relative path to the VERSION file i.e. "../../", to instead pull the
> > path from "MESON_SOURCE_ROOT" in the environment, which should be more
> > robust.
> 
> Yes it would be a bit better.
> If we merge this patch in 20.08, we'll forget about this improvement :)
> I suggest waiting 20.11 to merge the definitive improvement.
> 
I'd prefer now, but I can be patient, I suppose. :-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] doc/guides: remove dependency on make build system
  2020-07-22 12:59   ` Bruce Richardson
@ 2020-08-20 15:54     ` Bruce Richardson
  0 siblings, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2020-08-20 15:54 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: John McNamara, Marko Kovacevic, dev

On Wed, Jul 22, 2020 at 01:59:49PM +0100, Bruce Richardson wrote:
> On Wed, Jul 22, 2020 at 02:45:54PM +0200, Thomas Monjalon wrote:
> > 21/07/2020 17:39, Bruce Richardson:
> > > When building the DPDK guide documents, the DPDK version information was
> > > pulled using "make showversion", which meant there was a dependency on
> > > the DPDK make-based build system. Change this to just read the data from
> > > the VERSION file in the root directory.
> > > 
> > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > ---
> > > NOTE: When make build system is completed removed, we can change the
> > > relative path to the VERSION file i.e. "../../", to instead pull the
> > > path from "MESON_SOURCE_ROOT" in the environment, which should be more
> > > robust.
> > 
> > Yes it would be a bit better.
> > If we merge this patch in 20.08, we'll forget about this improvement :)
> > I suggest waiting 20.11 to merge the definitive improvement.
> > 
> I'd prefer now, but I can be patient, I suppose. :-)

Updated and improved version of this patch is now part of the "make
removal" patch series. Marking this standalone patch as superceded.

/Bruce

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-08-20 15:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-21 15:39 [dpdk-dev] [PATCH] doc/guides: remove dependency on make build system Bruce Richardson
2020-07-21 15:42 ` Bruce Richardson
2020-07-22 12:45 ` Thomas Monjalon
2020-07-22 12:59   ` Bruce Richardson
2020-08-20 15:54     ` Bruce Richardson

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).