Renaming software projects

I renamed “django-north” to “North” on PyPI.

Here is how I did it:

  • Run pip uninstall django-north
  • In setup.py, change name from “django-north” to “North”
  • Run python setup.py register. This is the final confirmation that nobody else had registered this name before.
  • Run pip install -e t:hgworknorth

So the Python package name and my internal name are “north”, on PyPI it is now “North”. And on Google it continues to be “django-north” because I don’t believe it is possible to rename a project there as easily.

I then also renamed “django-site” to “DjangoSite” on PyPI. Which I then regretted and undid. So for django-site the Python package name is “djangosite”, my internal name is just “site”, and the official names on PyPI and Google are “django-site”.

I should probably also rename “lino” to “Lino”. But “lino-welfare” should remain lowercased.

Uh! The rules of naming software projects would deserve a whole book to be written by a linguist…

setup.py register says TypeError: ‘NoneType’ object has no attribute ‘__getitem__’

In a first attempt of python setup.py register I had the following error message:

running check
Traceback (most recent call last):
  File "setup.py", line 4, in <module>
  File "c:\Python27\lib\site-packages\docutils\nodes.py", line 1021, in set_id
    for id in node['ids']:
TypeError: 'NoneType' object has no attribute '__getitem__'

This was because I used the text role “xfile” (unknown for PyPI which uses only docutils and not Sphinx) in my README.txt file:

Basic usage in your :xfile:`settings.py` file is...

Tutorial: Multilingual database content using North

I wrote a new tutorial about multi-lingual database content. north:mldbc_tutorial. Also updated documentation about north:mldbc

Started to used InterSphinx references.

Multilingual database content using North. This is a tested document and a first useful application of what I’ve been doing last week.

Also note the new method djangosite.Site.call_command()… that would deserv e another new chapter in djangosite.

Lino is currently growing more quickly than I can write…

rsync without password

Until now I wasn’t too much disturbed by the fact that rsync asks me for a password each time I publish the html generated by Sphinx to LF. Yes annoying, but rsync was still much quicker and easier to use than any other method I’ve tried.

But that’s because I had never managed 4 software projects in parallel before. Now it was time to solve this old issue.

I had already used ssh-keygen before, so I had my key pair. The problem was that I had generated it with a passphrase.

But in ssh-keygen I read how easy it is to remove the passphrase:

$ ssh-keygen -p Enter file in which the key is (/home/luc/.ssh/id_rsa): Enter old passphrase: Key has comment ‘/home/luc/.ssh/id_rsa’ Enter new passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved with the new passphrase.

Another thing: On the remote machine (where I have root access), in /etc/ssh/sshd_config I had to find the AuthorizedKeysFile parameter and uncomment it:

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile      %h/.ssh/authorized_keys

Then again on the remote machine I

$ nano ~/.ssh/authorized_keys
$ chmod og-r .ssh/authorized_keys
$ chmod og-rwx -R .ssh


mod = importlib.import_module(self.SETTINGS_MODULE) #try: # mod = importlib.import_module(self.SETTINGS_MODULE) #except ImportError as e: # raise ImportError(“Could not import settings ‘%s’ (Is it on sys.path?): %s” % (self.SETTINGS_MODULE, e))