[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH v2 7/8] support/scripts: make uk-trace installable



Hi Costin,

thanks for testing this. I think I fixed your problems. Before I send
v3, could you please try again with the attached patch?

Please note, that documentation is changed tool. Now creating of virtual
environment is done using 'virtualenv' tool. Which installs 'wheel'
package - that should solve your second problem.

Thank you!
Cheers, Yuri.

Attachment: 0001-fix-setup-tools-problems.patch
Description: Text Data

Costin Lupu <costin.lup@xxxxxxxxx> writes:

> Hi Yuri,
>
> Unfortunately, this doesn't work. I followed the steps on 2 different
> machines running Debian 9 and on a third one with Debian 10 (all of them
> with the latest updates). I tried creating the environment both in the
> application directory and unikraft core directory, without success.
>
> First problem: When first running `pip install --editable .` I get an
> error that doesn't occur on the second running, please see attached txt
> with the output.
>
> Second problem: I cannot run env/bin/uk-trace, again please see attached
> txt.
>
> Thanks,
> Costin
>
> On 5/30/19 2:44 AM, Yuri Volchkov wrote:
>> Now it is possible to install uk-trace in your local virtual
>> environment. For example:
>>    python3 -m venv env
>>    . env/bin/activate
>>    cd support/scripts/uk_trace
>>    pip install --editable .
>>    deactivate
>> 
>> All the dependencies will be installed in the 'env' folder, not to
>> your machine. And you do not need to enter your virtual environment,
>> you can call directly:
>> 
>>    env/bin/uk-trace
>> 
>> Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx>
>> ---
>>  .gitignore                        |  1 +
>>  support/scripts/uk_trace/setup.py | 14 ++++++++++++++
>>  2 files changed, 15 insertions(+)
>>  create mode 100644 support/scripts/uk_trace/setup.py
>> 
>> diff --git a/.gitignore b/.gitignore
>> index 17908b50..09e4ba81 100644
>> --- a/.gitignore
>> +++ b/.gitignore
>> @@ -34,3 +34,4 @@ GTAGS
>>  # cscope files
>>  cscope.*
>>  ncscope.*
>> +support/scripts/uk_trace/uk_trace.egg-info/
>> diff --git a/support/scripts/uk_trace/setup.py 
>> b/support/scripts/uk_trace/setup.py
>> new file mode 100644
>> index 00000000..303273ad
>> --- /dev/null
>> +++ b/support/scripts/uk_trace/setup.py
>> @@ -0,0 +1,14 @@
>> +from setuptools import setup
>> +
>> +setup(
>> +    name='uk_trace',
>> +    version='0.1',
>> +    py_modules=['main'],
>> +    install_requires=[
>> +        'Click', 'tabulate',
>> +    ],
>> +    entry_points='''
>> +        [console_scripts]
>> +        uk-trace=trace:cli
>> +    ''',
>> +)
>> 
> (1) --------------- PIP INSTALL PROBLEM ---------------
> (env) ~/unikraft/support/scripts/uk_trace$ pip install --editable .
> Obtaining 
> file:///home/wolf/nfv/dev/unikraft/unikraft.git/support/scripts/uk_trace
> Collecting Click (from uk-trace==0.1)
>   Using cached 
> https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
>                                                                               
>        
> Collecting tabulate (from uk-trace==0.1)
>   Using cached 
> https://files.pythonhosted.org/packages/c2/fd/202954b3f0eb896c53b7b6f07390851b1fd2ca84aa95880d7ae4f434c4ac/tabulate-0.8.3.tar.gz
>                                                                               
>                 
> Building wheels for collected packages: tabulate
>   Running setup.py bdist_wheel for tabulate ... error
>   Complete output from command 
> /home/wolf/nfv/dev/unikraft/unikraft.git/env/bin/python3 -u -c "import 
> setuptools, 
> tokenize;__file__='/tmp/pip-install-c9z4b9sq/tabulate/setup.py';f=getattr(tokenize,
>  'open', open)(__file__);code=f.read().replace('\r\n', 
> '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d 
> /tmp/pip-wheel-1xqn5_md --python-tag cp37:                                    
>                                                                            
>   usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
>      or: -c --help [cmd1 cmd2 ...]
>      or: -c --help-commands
>      or: -c cmd --help
>
>   error: invalid command 'bdist_wheel'
>
>   ----------------------------------------
>   Failed building wheel for tabulate
>   Running setup.py clean for tabulate
> Failed to build tabulate
> Installing collected packages: Click, tabulate, uk-trace
>   Running setup.py install for tabulate ... done
>   Running setup.py develop for uk-trace
> Successfully installed Click-7.0 tabulate-0.8.3 uk-trace
> (env) ~/unikraft/support/scripts/uk_trace$ pip install --editable .
> Obtaining 
> file:///home/wolf/nfv/dev/unikraft/unikraft.git/support/scripts/uk_trace
> Requirement already satisfied: Click in 
> /home/wolf/nfv/dev/unikraft/unikraft.git/env/lib/python3.7/site-packages 
> (from uk-trace==0.1) (7.0)                                                    
>                                               
> Requirement already satisfied: tabulate in 
> /home/wolf/nfv/dev/unikraft/unikraft.git/env/lib/python3.7/site-packages 
> (from uk-trace==0.1) (0.8.3)                                                  
>                                            
> Installing collected packages: uk-trace
>   Found existing installation: uk-trace 0.1
>     Uninstalling uk-trace-0.1:
>       Successfully uninstalled uk-trace-0.1
>   Running setup.py develop for uk-trace
>
>
> (2) --------------- UK-TRACE RUNNING PROBLEM ---------------
> $ env/bin/uk-trace --help
> Traceback (most recent call last):
>   File 
> "/home/wolf/nfv/dev/unikraft/unikraft.git/env/lib/python3.7/site-packages/pkg_resources/__init__.py",
>  line 2419, in resolve                                                        
>                                                    
>     return functools.reduce(getattr, self.attrs, module)
> AttributeError: module 'trace' has no attribute 'cli'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "env/bin/uk-trace", line 11, in <module>
>     load_entry_point('uk-trace', 'console_scripts', 'uk-trace')()
>   File 
> "/home/wolf/nfv/dev/unikraft/unikraft.git/env/lib/python3.7/site-packages/pkg_resources/__init__.py",
>  line 489, in load_entry_point                                                
>                                                    
>     return get_distribution(dist).load_entry_point(group, name)
>   File 
> "/home/wolf/nfv/dev/unikraft/unikraft.git/env/lib/python3.7/site-packages/pkg_resources/__init__.py",
>  line 2793, in load_entry_point                                               
>                                                    
>     return ep.load()
>   File 
> "/home/wolf/nfv/dev/unikraft/unikraft.git/env/lib/python3.7/site-packages/pkg_resources/__init__.py",
>  line 2411, in load                                                           
>                                                    
>     return self.resolve()
>   File 
> "/home/wolf/nfv/dev/unikraft/unikraft.git/env/lib/python3.7/site-packages/pkg_resources/__init__.py",
>  line 2421, in resolve                                                        
>                                                    
>     raise ImportError(str(exc))
> ImportError: module 'trace' has no attribute 'cli'

-- 
Yuri Volchkov
Software Specialist

NEC Europe Ltd
Kurfürsten-Anlage 36
D-69115 Heidelberg
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.