[Python-Dev] Have problem when building python3.5.1 rpm with default SPEC file

2017-01-19 Thread Dahui Jiang
Hi all:
I'm try to build a python rpm from source python3.5.1, and I use the spec file 
in the source tree.
But the building is not success as print the following error:
***
running build
running build_ext
error: [Errno 2] No such file or directory: 'Modules/Setup'
error: Bad exit status from /var/tmp/rpm-tmp.DDm3jI (%build)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.DDm3jI (%build)


Regards
Dahui
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Have problem when building python3.5.1 rpm with default SPEC file

2017-01-19 Thread Charalampos Stratakis
Hello,

This is a distro specific issue so this list might not be the best for 
resolving that, you should contact your distro's package maintainers of python.

For Fedora 25 we currently ship Python 3.5.2, which builds fine with this SPEC 
file [0], so maybe you could give this a try.

[0] http://pkgs.fedoraproject.org/cgit/rpms/python3.git/tree/python3.spec?h=f25

Regards,

Charalampos Stratakis
Associate Software Engineer
Python Maintenance Team, Red Hat


- Original Message -
From: "Dahui Jiang" 
To: [email protected]
Sent: Thursday, January 19, 2017 12:54:16 PM
Subject: [Python-Dev] Have problem when building python3.5.1 rpm with default 
SPEC file



Hi all: 

I’m try to build a python rpm from source python3.5.1, and I use the spec file 
in the source tree. 

But the building is not success as print the following error: 



*** 

running build 

running build_ext 

error: [Errno 2] No such file or directory: 'Modules/Setup' 

error: Bad exit status from /var/tmp/rpm-tmp.DDm3jI (%build) 





RPM build errors: 

Bad exit status from /var/tmp/rpm-tmp.DDm3jI (%build) 

 



Regards 

Dahui 

___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/cstratak%40redhat.com
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] FunctionDef.returns - explicit 'None' return type hint

2017-01-19 Thread Valentin Iovene via Python-Dev
With a ast.FunctionDef ast.AST node, is it possible to make the
difference between this function

def hello_world():
print('hello world')

and this one

def hello_world() -> None:
print('hello world')

?

In both cases, the FunctionDef node has its 'returns' (return type
hint) attribute set to None.

-- 
Valentin
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] FunctionDef.returns - explicit 'None' return type hint

2017-01-19 Thread Guido van Rossum
On Thu, Jan 19, 2017 at 10:59 AM, Valentin Iovene via Python-Dev <
[email protected]> wrote:

> With a ast.FunctionDef ast.AST node, is it possible to make the
> difference between this function
>
> def hello_world():
> print('hello world')
>
> and this one
>
> def hello_world() -> None:
> print('hello world')
>
> ?
>
> In both cases, the FunctionDef node has its 'returns' (return type
> hint) attribute set to None.


>>> t = compile('def f(): pass', '', 'exec', ast.PyCF_ONLY_AST)
>>> print(t.body[0].returns)
None
>>> t = compile('def f() -> None: pass', '', 'exec', ast.PyCF_ONLY_AST)
>>> print(t.body[0].returns)
<_ast.NameConstant object at 0x10a900f28>
>>>  print(t.body[0].returns.value)
None
>>>

-- 
--Guido van Rossum (python.org/~guido )
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] FunctionDef.returns - explicit 'None' return type hint

2017-01-19 Thread Valentin Iovene via Python-Dev
> >>> t = compile('def f(): pass', '', 'exec', ast.PyCF_ONLY_AST)
> >>> print(t.body[0].returns)
> None
> >>> t = compile('def f() -> None: pass', '', 'exec', ast.PyCF_ONLY_AST)
> >>> print(t.body[0].returns)
> <_ast.NameConstant object at 0x10a900f28>
> >>>  print(t.body[0].returns.value)
> None

My bad, thank you my King. ;)

-- 
Valentin
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com