PyAr / fades

fades is a system that automatically handles the virtualenvs in the cases normally found when writing scripts and simple programs, and even helps to administer big projects.
https://fades.readthedocs.io
GNU General Public License v3.0
216 stars 44 forks source link

Add xdg as a dependency to the README file #27

Closed gilgamezh closed 9 years ago

gilgamezh commented 9 years ago
 /tmp  pyvenv testfade
 /tmp  source testfade/bin/activate
(testfade)  /tmp  pip install git+https://github.com/PyAr/fades.git
Downloading/unpacking git+https://github.com/PyAr/fades.git
  Cloning https://github.com/PyAr/fades.git to ./pip-yupq5skl-build
  Running setup.py (path:/tmp/pip-yupq5skl-build/setup.py) egg_info for package from git+https://github.com/PyAr/fades.git

    package init file 'fades/__init__.py' not found (or not a regular file)
Installing collected packages: fades
  Running setup.py install for fades
    package init file 'fades/__init__.py' not found (or not a regular file)
    changing mode of build/scripts-3.4/fades from 644 to 755

    changing mode of /tmp/testfade/bin/fades to 755
Successfully installed fades
Cleaning up...
(testfade)  /tmp  fades 
Traceback (most recent call last):
  File "/tmp/testfade/bin/fades", line 44, in <module>
    from fades import main
  File "/tmp/testfade/share/fades/fades/main.py", line 26, in <module>
    from fades.pipmanager import PipManager
  File "/tmp/testfade/share/fades/fades/pipmanager.py", line 27, in <module>
    from xdg import BaseDirectory
ImportError: No module named 'xdg'
facundobatista commented 9 years ago

We should also note this dependency in the setup.py, and in the .deb and other installation methods.

gilgamezh commented 9 years ago

:+1: Also fades have to support run without xdg. If xdg is not installed fades have to use $HOME/fades instead

gilgamezh commented 9 years ago

My test on a virtualenv:

(prueba)  ~/code/fades   xdg_optional  bin/fades -v ~/sarasa2.py
*** fades ***  2015-02-11 10:55:26,233  fades              DEBUG    Running Python sys.version_info(major=3, minor=4, micro=2, releaselevel='final', serial=0) on 'linux'
*** fades ***  2015-02-11 10:55:26,234  fades              DEBUG    Starting fades v. 1.0
*** fades ***  2015-02-11 10:55:26,234  fades.attribs      DEBUG    Getting fades info from xattr for '/home/gilgamezh/sarasa2.py'
*** fades ***  2015-02-11 10:55:26,235  fades.attribs      DEBUG    Xattr obtained: {}
*** fades ***  2015-02-11 10:55:26,235  fades              INFO     /home/gilgamezh/sarasa2.py has not a virtualenv yet. Creating one
*** fades ***  2015-02-11 10:55:26,236  fades.helpers      DEBUG    xdg not installed. Using home folder
*** fades ***  2015-02-11 10:55:26,236  fades.envbuilder   DEBUG    Env will be created at: /home/gilgamezh/.fades/beab2098-b2bf-4ca4-a8b3-3683e81a6a69
*** fades ***  2015-02-11 10:55:29,556  fades.envbuilder   DEBUG    env_bin_path: /home/gilgamezh/.fades/beab2098-b2bf-4ca4-a8b3-3683e81a6a69/bin
*** fades ***  2015-02-11 10:55:29,558  fades.helpers      DEBUG    xdg not installed. Using home folder
*** fades ***  2015-02-11 10:55:29,558  fades              DEBUG    Managing dependencies for repo <Repo.pypi: 1>: requested={'requests': {'version': '==2.5.1'}} previous={}
*** fades ***  2015-02-11 10:55:29,559  fades.pipmanager   INFO     Installing dependency: requests==2.5.1
*** fades ***  2015-02-11 10:55:29,559  fades.exec         DEBUG    Executing external command: ['/home/gilgamezh/.fades/beab2098-b2bf-4ca4-a8b3-3683e81a6a69/bin/pip', 'install', 'requests==2.5.1']
*** fades ***  2015-02-11 10:55:29,986  fades.exec         DEBUG    :: Downloading/unpacking requests==2.5.1
*** fades ***  2015-02-11 10:55:32,911  fades.exec         DEBUG    :: Installing collected packages: requests
*** fades ***  2015-02-11 10:55:33,449  fades.exec         DEBUG    :: Successfully installed requests
*** fades ***  2015-02-11 10:55:33,449  fades.exec         DEBUG    :: Cleaning up...
*** fades ***  2015-02-11 10:55:33,527  fades.pipmanager   DEBUG    getting installed versión for requests
*** fades ***  2015-02-11 10:55:34,015  fades.pipmanager   DEBUG    Installed versión of requests is: 2.5.1
*** fades ***  2015-02-11 10:55:34,016  fades              DEBUG    Resulted dependencies: {'requests': {'version': '2.5.1'}}
*** fades ***  2015-02-11 10:55:34,017  fades.attribs      DEBUG    Saving xattr info: {'requested_deps': {<Repo.pypi: 1>: {'requests': {'version': '2.5.1'}}}, 'env_bin_path': '/home/gilgamezh/.fades/beab2098-b2bf-4ca4-a8b3-3683e81a6a69/bin', 'pip_installed': True, 'env_path': '/home/gilgamezh/.fades/beab2098-b2bf-4ca4-a8b3-3683e81a6a69'}
*** fades ***  2015-02-11 10:55:34,018  fades              DEBUG    Calling the child Python program '/home/gilgamezh/sarasa2.py' with options []
HOLA FADES
facundobatista commented 9 years ago

All annotations properly done now.