DPDK patches and discussions
 help / color / Atom feed
* [dpdk-dev] [PATCH] doc: allow sphinx build with no DPDK version
@ 2020-11-19 10:41 Anatoly Burakov
  2020-11-19 11:24 ` Bruce Richardson
  2020-11-20  9:19 ` David Marchand
  0 siblings, 2 replies; 8+ messages in thread
From: Anatoly Burakov @ 2020-11-19 10:41 UTC (permalink / raw)
  To: dev; +Cc: thomas, bruce.richardson

Currently, when building sphinx documentation, the build will only
succeed if being run from the build system, because the conf.py script
expects DPDK_VERSION environment variable to be set, and crashes if it
is not.

However, there are certain external tools (such as sphinx documentation
preview extensions for certain IDE's) that use live preview and thus
rely on running their own sphinx commands. In these cases, it is useful
to permit building sphinx documentation without specifying the
DPDK_VERSION environment variable. The version string is the only thing
preventing manual sphinx build commands from working.

Fix the conf.py to use "None" as a version string in cases when
DPDK_VERSION environment variable is not set.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 doc/guides/conf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index 9de490e1c4..aceeb62a4f 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -36,7 +36,7 @@
 html_show_copyright = False
 highlight_language = 'none'
 
-release = environ['DPDK_VERSION']
+release = environ.setdefault('DPDK_VERSION', "None")
 version = release
 
 master_doc = 'index'
-- 
2.17.1

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

* Re: [dpdk-dev] [PATCH] doc: allow sphinx build with no DPDK version
  2020-11-19 10:41 [dpdk-dev] [PATCH] doc: allow sphinx build with no DPDK version Anatoly Burakov
@ 2020-11-19 11:24 ` Bruce Richardson
  2020-11-19 11:44   ` Burakov, Anatoly
  2020-11-20  9:19 ` David Marchand
  1 sibling, 1 reply; 8+ messages in thread
From: Bruce Richardson @ 2020-11-19 11:24 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dev, thomas

On Thu, Nov 19, 2020 at 10:41:56AM +0000, Anatoly Burakov wrote:
> Currently, when building sphinx documentation, the build will only
> succeed if being run from the build system, because the conf.py script
> expects DPDK_VERSION environment variable to be set, and crashes if it
> is not.
> 
> However, there are certain external tools (such as sphinx documentation
> preview extensions for certain IDE's) that use live preview and thus
> rely on running their own sphinx commands. In these cases, it is useful
> to permit building sphinx documentation without specifying the
> DPDK_VERSION environment variable. The version string is the only thing
> preventing manual sphinx build commands from working.
> 
> Fix the conf.py to use "None" as a version string in cases when
> DPDK_VERSION environment variable is not set.
> 
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
>  doc/guides/conf.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/doc/guides/conf.py b/doc/guides/conf.py
> index 9de490e1c4..aceeb62a4f 100644
> --- a/doc/guides/conf.py
> +++ b/doc/guides/conf.py
> @@ -36,7 +36,7 @@
>  html_show_copyright = False
>  highlight_language = 'none'
>  
> -release = environ['DPDK_VERSION']
> +release = environ.setdefault('DPDK_VERSION', "None")
>  version = release

Since this is python, we can probably pull the value from the VERSION file
on the FS if it's not specified in the environment. However, for now in
terms of solving this problem, this version is ok.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

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

* Re: [dpdk-dev] [PATCH] doc: allow sphinx build with no DPDK version
  2020-11-19 11:24 ` Bruce Richardson
@ 2020-11-19 11:44   ` Burakov, Anatoly
  2020-11-19 11:48     ` Bruce Richardson
  0 siblings, 1 reply; 8+ messages in thread
From: Burakov, Anatoly @ 2020-11-19 11:44 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, thomas

On 19-Nov-20 11:24 AM, Bruce Richardson wrote:
> On Thu, Nov 19, 2020 at 10:41:56AM +0000, Anatoly Burakov wrote:
>> Currently, when building sphinx documentation, the build will only
>> succeed if being run from the build system, because the conf.py script
>> expects DPDK_VERSION environment variable to be set, and crashes if it
>> is not.
>>
>> However, there are certain external tools (such as sphinx documentation
>> preview extensions for certain IDE's) that use live preview and thus
>> rely on running their own sphinx commands. In these cases, it is useful
>> to permit building sphinx documentation without specifying the
>> DPDK_VERSION environment variable. The version string is the only thing
>> preventing manual sphinx build commands from working.
>>
>> Fix the conf.py to use "None" as a version string in cases when
>> DPDK_VERSION environment variable is not set.
>>
>> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
>> ---
>>   doc/guides/conf.py | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/doc/guides/conf.py b/doc/guides/conf.py
>> index 9de490e1c4..aceeb62a4f 100644
>> --- a/doc/guides/conf.py
>> +++ b/doc/guides/conf.py
>> @@ -36,7 +36,7 @@
>>   html_show_copyright = False
>>   highlight_language = 'none'
>>   
>> -release = environ['DPDK_VERSION']
>> +release = environ.setdefault('DPDK_VERSION', "None")
>>   version = release
> 
> Since this is python, we can probably pull the value from the VERSION file
> on the FS if it's not specified in the environment. However, for now in
> terms of solving this problem, this version is ok.
> 
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> 

Yes, we could, and i had that thought. I just decided to keep it simple 
and not depending on FS layout. If there's consensus that picking it up 
from FS is better approach, i can submit a v2.

-- 
Thanks,
Anatoly

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

* Re: [dpdk-dev] [PATCH] doc: allow sphinx build with no DPDK version
  2020-11-19 11:44   ` Burakov, Anatoly
@ 2020-11-19 11:48     ` Bruce Richardson
  2020-11-19 12:03       ` Burakov, Anatoly
  0 siblings, 1 reply; 8+ messages in thread
From: Bruce Richardson @ 2020-11-19 11:48 UTC (permalink / raw)
  To: Burakov, Anatoly; +Cc: dev, thomas

On Thu, Nov 19, 2020 at 11:44:06AM +0000, Burakov, Anatoly wrote:
> On 19-Nov-20 11:24 AM, Bruce Richardson wrote:
> > On Thu, Nov 19, 2020 at 10:41:56AM +0000, Anatoly Burakov wrote:
> > > Currently, when building sphinx documentation, the build will only
> > > succeed if being run from the build system, because the conf.py
> > > script expects DPDK_VERSION environment variable to be set, and
> > > crashes if it is not.
> > > 
> > > However, there are certain external tools (such as sphinx
> > > documentation preview extensions for certain IDE's) that use live
> > > preview and thus rely on running their own sphinx commands. In these
> > > cases, it is useful to permit building sphinx documentation without
> > > specifying the DPDK_VERSION environment variable. The version string
> > > is the only thing preventing manual sphinx build commands from
> > > working.
> > > 
> > > Fix the conf.py to use "None" as a version string in cases when
> > > DPDK_VERSION environment variable is not set.
> > > 
> > > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> ---
> > > doc/guides/conf.py | 2 +- 1 file changed, 1 insertion(+), 1
> > > deletion(-)
> > > 
> > > diff --git a/doc/guides/conf.py b/doc/guides/conf.py index
> > > 9de490e1c4..aceeb62a4f 100644 --- a/doc/guides/conf.py +++
> > > b/doc/guides/conf.py @@ -36,7 +36,7 @@ html_show_copyright = False
> > > highlight_language = 'none' -release = environ['DPDK_VERSION']
> > > +release = environ.setdefault('DPDK_VERSION', "None") version =
> > > release
> > 
> > Since this is python, we can probably pull the value from the VERSION
> > file on the FS if it's not specified in the environment. However, for
> > now in terms of solving this problem, this version is ok.
> > 
> > Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> > 
> 
> Yes, we could, and i had that thought. I just decided to keep it simple
> and not depending on FS layout. If there's consensus that picking it up
> from FS is better approach, i can submit a v2.
> 

My view is that it depends on whether you want this considered for 20.11.
If so, I'd suggest that a one-line fix is ok for possible inclusion. For
21.02, a fuller solution would probably be better.

/Bruce

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

* Re: [dpdk-dev] [PATCH] doc: allow sphinx build with no DPDK version
  2020-11-19 11:48     ` Bruce Richardson
@ 2020-11-19 12:03       ` Burakov, Anatoly
  2020-11-19 12:22         ` Bruce Richardson
  0 siblings, 1 reply; 8+ messages in thread
From: Burakov, Anatoly @ 2020-11-19 12:03 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, thomas

On 19-Nov-20 11:48 AM, Bruce Richardson wrote:
> On Thu, Nov 19, 2020 at 11:44:06AM +0000, Burakov, Anatoly wrote:
>> On 19-Nov-20 11:24 AM, Bruce Richardson wrote:
>>> On Thu, Nov 19, 2020 at 10:41:56AM +0000, Anatoly Burakov wrote:
>>>> Currently, when building sphinx documentation, the build will only
>>>> succeed if being run from the build system, because the conf.py
>>>> script expects DPDK_VERSION environment variable to be set, and
>>>> crashes if it is not.
>>>>
>>>> However, there are certain external tools (such as sphinx
>>>> documentation preview extensions for certain IDE's) that use live
>>>> preview and thus rely on running their own sphinx commands. In these
>>>> cases, it is useful to permit building sphinx documentation without
>>>> specifying the DPDK_VERSION environment variable. The version string
>>>> is the only thing preventing manual sphinx build commands from
>>>> working.
>>>>
>>>> Fix the conf.py to use "None" as a version string in cases when
>>>> DPDK_VERSION environment variable is not set.
>>>>
>>>> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> ---
>>>> doc/guides/conf.py | 2 +- 1 file changed, 1 insertion(+), 1
>>>> deletion(-)
>>>>
>>>> diff --git a/doc/guides/conf.py b/doc/guides/conf.py index
>>>> 9de490e1c4..aceeb62a4f 100644 --- a/doc/guides/conf.py +++
>>>> b/doc/guides/conf.py @@ -36,7 +36,7 @@ html_show_copyright = False
>>>> highlight_language = 'none' -release = environ['DPDK_VERSION']
>>>> +release = environ.setdefault('DPDK_VERSION', "None") version =
>>>> release
>>>
>>> Since this is python, we can probably pull the value from the VERSION
>>> file on the FS if it's not specified in the environment. However, for
>>> now in terms of solving this problem, this version is ok.
>>>
>>> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>>>
>>
>> Yes, we could, and i had that thought. I just decided to keep it simple
>> and not depending on FS layout. If there's consensus that picking it up
>> from FS is better approach, i can submit a v2.
>>
> 
> My view is that it depends on whether you want this considered for 20.11.
> If so, I'd suggest that a one-line fix is ok for possible inclusion. For
> 21.02, a fuller solution would probably be better.
> 
> /Bruce
> 

It would be nice if this was included in 20.11, so i'll leave it as is :)

-- 
Thanks,
Anatoly

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

* Re: [dpdk-dev] [PATCH] doc: allow sphinx build with no DPDK version
  2020-11-19 12:03       ` Burakov, Anatoly
@ 2020-11-19 12:22         ` Bruce Richardson
  2020-11-19 14:11           ` Thomas Monjalon
  0 siblings, 1 reply; 8+ messages in thread
From: Bruce Richardson @ 2020-11-19 12:22 UTC (permalink / raw)
  To: Burakov, Anatoly; +Cc: dev, thomas, david.marchand

On Thu, Nov 19, 2020 at 12:03:11PM +0000, Burakov, Anatoly wrote:
> On 19-Nov-20 11:48 AM, Bruce Richardson wrote:
> > On Thu, Nov 19, 2020 at 11:44:06AM +0000, Burakov, Anatoly wrote:
> > > On 19-Nov-20 11:24 AM, Bruce Richardson wrote:
> > > > On Thu, Nov 19, 2020 at 10:41:56AM +0000, Anatoly Burakov wrote:
> > > > > Currently, when building sphinx documentation, the build will only
> > > > > succeed if being run from the build system, because the conf.py
> > > > > script expects DPDK_VERSION environment variable to be set, and
> > > > > crashes if it is not.
> > > > > 
> > > > > However, there are certain external tools (such as sphinx
> > > > > documentation preview extensions for certain IDE's) that use live
> > > > > preview and thus rely on running their own sphinx commands. In these
> > > > > cases, it is useful to permit building sphinx documentation without
> > > > > specifying the DPDK_VERSION environment variable. The version string
> > > > > is the only thing preventing manual sphinx build commands from
> > > > > working.
> > > > > 
> > > > > Fix the conf.py to use "None" as a version string in cases when
> > > > > DPDK_VERSION environment variable is not set.
> > > > > 
> > > > > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> ---
> > > > > doc/guides/conf.py | 2 +- 1 file changed, 1 insertion(+), 1
> > > > > deletion(-)
> > > > > 
> > > > > diff --git a/doc/guides/conf.py b/doc/guides/conf.py index
> > > > > 9de490e1c4..aceeb62a4f 100644 --- a/doc/guides/conf.py +++
> > > > > b/doc/guides/conf.py @@ -36,7 +36,7 @@ html_show_copyright = False
> > > > > highlight_language = 'none' -release = environ['DPDK_VERSION']
> > > > > +release = environ.setdefault('DPDK_VERSION', "None") version =
> > > > > release
> > > > 
> > > > Since this is python, we can probably pull the value from the VERSION
> > > > file on the FS if it's not specified in the environment. However, for
> > > > now in terms of solving this problem, this version is ok.
> > > > 
> > > > Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> > > > 
> > > 
> > > Yes, we could, and i had that thought. I just decided to keep it simple
> > > and not depending on FS layout. If there's consensus that picking it up
> > > from FS is better approach, i can submit a v2.
> > > 
> > 
> > My view is that it depends on whether you want this considered for 20.11.
> > If so, I'd suggest that a one-line fix is ok for possible inclusion. For
> > 21.02, a fuller solution would probably be better.
> > 
> > /Bruce
> > 
> 
> It would be nice if this was included in 20.11, so i'll leave it as is :)
>
Thought so. Therefore I suggest you also need feedback from Thomas or
David? Adding them on CC...

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

* Re: [dpdk-dev] [PATCH] doc: allow sphinx build with no DPDK version
  2020-11-19 12:22         ` Bruce Richardson
@ 2020-11-19 14:11           ` Thomas Monjalon
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2020-11-19 14:11 UTC (permalink / raw)
  To: Burakov, Anatoly, Bruce Richardson; +Cc: dev, david.marchand

19/11/2020 13:22, Bruce Richardson:
> On Thu, Nov 19, 2020 at 12:03:11PM +0000, Burakov, Anatoly wrote:
> > On 19-Nov-20 11:48 AM, Bruce Richardson wrote:
> > > On Thu, Nov 19, 2020 at 11:44:06AM +0000, Burakov, Anatoly wrote:
> > > > On 19-Nov-20 11:24 AM, Bruce Richardson wrote:
> > > > > On Thu, Nov 19, 2020 at 10:41:56AM +0000, Anatoly Burakov wrote:
> > > > > > Currently, when building sphinx documentation, the build will only
> > > > > > succeed if being run from the build system, because the conf.py
> > > > > > script expects DPDK_VERSION environment variable to be set, and
> > > > > > crashes if it is not.
> > > > > > 
> > > > > > However, there are certain external tools (such as sphinx
> > > > > > documentation preview extensions for certain IDE's) that use live
> > > > > > preview and thus rely on running their own sphinx commands. In these
> > > > > > cases, it is useful to permit building sphinx documentation without
> > > > > > specifying the DPDK_VERSION environment variable. The version string
> > > > > > is the only thing preventing manual sphinx build commands from
> > > > > > working.
> > > > > > 
> > > > > > Fix the conf.py to use "None" as a version string in cases when
> > > > > > DPDK_VERSION environment variable is not set.
> > > > > > 
> > > > > > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> ---
> > > > > > doc/guides/conf.py | 2 +- 1 file changed, 1 insertion(+), 1
> > > > > > deletion(-)
> > > > > > 
> > > > > > diff --git a/doc/guides/conf.py b/doc/guides/conf.py index
> > > > > > 9de490e1c4..aceeb62a4f 100644 --- a/doc/guides/conf.py +++
> > > > > > b/doc/guides/conf.py @@ -36,7 +36,7 @@ html_show_copyright = False
> > > > > > highlight_language = 'none' -release = environ['DPDK_VERSION']
> > > > > > +release = environ.setdefault('DPDK_VERSION', "None") version =
> > > > > > release
> > > > > 
> > > > > Since this is python, we can probably pull the value from the VERSION
> > > > > file on the FS if it's not specified in the environment. However, for
> > > > > now in terms of solving this problem, this version is ok.
> > > > > 
> > > > > Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> > > > > 
> > > > 
> > > > Yes, we could, and i had that thought. I just decided to keep it simple
> > > > and not depending on FS layout. If there's consensus that picking it up
> > > > from FS is better approach, i can submit a v2.
> > > > 
> > > 
> > > My view is that it depends on whether you want this considered for 20.11.
> > > If so, I'd suggest that a one-line fix is ok for possible inclusion. For
> > > 21.02, a fuller solution would probably be better.
> > > 
> > > /Bruce
> > > 
> > 
> > It would be nice if this was included in 20.11, so i'll leave it as is :)
> >
> Thought so. Therefore I suggest you also need feedback from Thomas or
> David? Adding them on CC...

That's OK for me.



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

* Re: [dpdk-dev] [PATCH] doc: allow sphinx build with no DPDK version
  2020-11-19 10:41 [dpdk-dev] [PATCH] doc: allow sphinx build with no DPDK version Anatoly Burakov
  2020-11-19 11:24 ` Bruce Richardson
@ 2020-11-20  9:19 ` David Marchand
  1 sibling, 0 replies; 8+ messages in thread
From: David Marchand @ 2020-11-20  9:19 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dev, Thomas Monjalon, Bruce Richardson

On Thu, Nov 19, 2020 at 11:42 AM Anatoly Burakov
<anatoly.burakov@intel.com> wrote:
>
> Currently, when building sphinx documentation, the build will only
> succeed if being run from the build system, because the conf.py script
> expects DPDK_VERSION environment variable to be set, and crashes if it
> is not.
>
> However, there are certain external tools (such as sphinx documentation
> preview extensions for certain IDE's) that use live preview and thus
> rely on running their own sphinx commands. In these cases, it is useful
> to permit building sphinx documentation without specifying the
> DPDK_VERSION environment variable. The version string is the only thing
> preventing manual sphinx build commands from working.
>
> Fix the conf.py to use "None" as a version string in cases when
> DPDK_VERSION environment variable is not set.
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

So now, no excuse for documentation patches that fail to build :-).

Applied, thanks.


-- 
David Marchand


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

end of thread, back to index

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19 10:41 [dpdk-dev] [PATCH] doc: allow sphinx build with no DPDK version Anatoly Burakov
2020-11-19 11:24 ` Bruce Richardson
2020-11-19 11:44   ` Burakov, Anatoly
2020-11-19 11:48     ` Bruce Richardson
2020-11-19 12:03       ` Burakov, Anatoly
2020-11-19 12:22         ` Bruce Richardson
2020-11-19 14:11           ` Thomas Monjalon
2020-11-20  9:19 ` David Marchand

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox