fontpatcher icon indicating copy to clipboard operation
fontpatcher copied to clipboard

explain how to use the script in README.rst

Open PhillipSz opened this issue 9 years ago • 6 comments

just a few lines

PhillipSz avatar Jun 20 '15 11:06 PhillipSz

Just for run this command , you will get everything ./setup.py --help

Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package

einverne avatar Oct 03 '15 07:10 einverne

Is this normal? Do I need to change permissions? Perhaps I have something mis-configured?

 ~/repos/fontpatcher ⮀ ⭠ develop ⮀ python setup.py install
running install
Checking .pth file support in /Library/Python/2.7/site-packages/
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-54316.pth'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /Library/Python/2.7/site-packages/

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://pythonhosted.org/setuptools/easy_install.html

Please make the appropriate changes for your system and try again.

F1LT3R avatar Mar 14 '16 14:03 F1LT3R

Now I have run this with sudo, things worked...

✘ ⮀ ~/repos/fontpatcher ⮀ ⭠ develop ⮀ sudo python setup.py install
Password:
running install
Checking .pth file support in /Library/Python/2.7/site-packages/
/usr/bin/python -E -c pass
TEST PASSED: /Library/Python/2.7/site-packages/ appears to support .pth files
running bdist_egg
running egg_info
creating Powerline_font_patcher.egg-info
writing requirements to Powerline_font_patcher.egg-info/requires.txt
writing Powerline_font_patcher.egg-info/PKG-INFO
writing top-level names to Powerline_font_patcher.egg-info/top_level.txt
writing dependency_links to Powerline_font_patcher.egg-info/dependency_links.txt
writing manifest file 'Powerline_font_patcher.egg-info/SOURCES.txt'
reading manifest file 'Powerline_font_patcher.egg-info/SOURCES.txt'
writing manifest file 'Powerline_font_patcher.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.11-intel/egg
running install_lib
warning: install_lib: 'build/lib' does not exist -- no Python modules to install

creating build/bdist.macosx-10.11-intel
creating build/bdist.macosx-10.11-intel/egg
creating build/bdist.macosx-10.11-intel/egg/EGG-INFO
installing scripts to build/bdist.macosx-10.11-intel/egg/EGG-INFO/scripts
running install_scripts
running build_scripts
creating build/bdist.macosx-10.11-intel/egg/EGG-INFO/scripts
copying build/scripts-2.7/powerline-fontpatcher -> build/bdist.macosx-10.11-intel/egg/EGG-INFO/scripts
changing mode of build/bdist.macosx-10.11-intel/egg/EGG-INFO/scripts/powerline-fontpatcher to 755
copying Powerline_font_patcher.egg-info/PKG-INFO -> build/bdist.macosx-10.11-intel/egg/EGG-INFO
copying Powerline_font_patcher.egg-info/SOURCES.txt -> build/bdist.macosx-10.11-intel/egg/EGG-INFO
copying Powerline_font_patcher.egg-info/dependency_links.txt -> build/bdist.macosx-10.11-intel/egg/EGG-INFO
copying Powerline_font_patcher.egg-info/not-zip-safe -> build/bdist.macosx-10.11-intel/egg/EGG-INFO
copying Powerline_font_patcher.egg-info/requires.txt -> build/bdist.macosx-10.11-intel/egg/EGG-INFO
copying Powerline_font_patcher.egg-info/top_level.txt -> build/bdist.macosx-10.11-intel/egg/EGG-INFO
creating dist
creating 'dist/Powerline_font_patcher-beta-py2.7.egg' and adding 'build/bdist.macosx-10.11-intel/egg' to it
removing 'build/bdist.macosx-10.11-intel/egg' (and everything under it)
Processing Powerline_font_patcher-beta-py2.7.egg
creating /Library/Python/2.7/site-packages/Powerline_font_patcher-beta-py2.7.egg
Extracting Powerline_font_patcher-beta-py2.7.egg to /Library/Python/2.7/site-packages
Adding Powerline-font-patcher beta to easy-install.pth file
Installing powerline-fontpatcher script to /usr/local/bin

Installed /Library/Python/2.7/site-packages/Powerline_font_patcher-beta-py2.7.egg
Processing dependencies for Powerline-font-patcher==beta
Finished processing dependencies for Powerline-font-patcher==beta

But when I try and run python scripts /fontpatcher....

~/repos/fontpatcher ⮀ ⭠ develop ⮀ python scripts/powerline-fontpatcher
The required FontForge modules could not be loaded.

You need FontForge with Python bindings for this script to work.

But didn't I just install FontForge when I ran sudo python install?

F1LT3R avatar Mar 14 '16 14:03 F1LT3R

@F1LT3R I chased this for hours upon hours, until realizing that instead of running the script through python, like:

./powerline-fontpatcher somefont.otf

I could just run the script though fontforge itself:

fontforge powerline-fontpatcher somefont.otf

tstelzer avatar Apr 13 '16 20:04 tstelzer

@tstelzer When i do that, i end up in the Python command line. Is that normal? I still don't understand how to actually patch the font. I'm with @PhillipSz, there should be instructions in the README.rst.

cargath avatar Jun 19 '16 13:06 cargath

@cargath I just run into the same issue and it worked when specifying the script location

fontforge scripts/powerline-fontpatcher somefont.otf

Ruto8 avatar Oct 13 '16 10:10 Ruto8