Move the src directory to poezio, for better cython compatibility.

This commit is contained in:
Emmanuel Gil Peyrot 2016-03-31 18:54:41 +01:00
parent cf44cf7cde
commit 332a5c2553
76 changed files with 19 additions and 30 deletions

View file

@ -13,7 +13,7 @@ clean:
rm -rf poezio.egg-info rm -rf poezio.egg-info
rm -rf dist rm -rf dist
rm -rf build rm -rf build
rm -f src/*.so rm -f poezio/*.so
install: all install: all
python3 setup.py install --root=$(DESTDIR) --optimize=1 python3 setup.py install --root=$(DESTDIR) --optimize=1

View file

@ -15,7 +15,7 @@
import sys, os, time import sys, os, time
sys.path.insert(0, os.path.abspath('../stub')) sys.path.insert(0, os.path.abspath('../stub'))
sys.path.append(os.path.abspath('../../src/')) sys.path.append(os.path.abspath('../../poezio/'))
sys.path.append(os.path.abspath('../../plugins/')) sys.path.append(os.path.abspath('../../plugins/'))
# If extensions (or modules to document with autodoc) are in another directory, # If extensions (or modules to document with autodoc) are in another directory,

View file

@ -249,7 +249,7 @@ To know exactly what the code of a key is, just run
.. code-block:: bash .. code-block:: bash
python3 src/keyboard.py python3 poezio/keyboard.py
And enter any key. And enter any key.

View file

@ -25,5 +25,5 @@ else
fi fi
$PYTHON3 -c 'import sys;(print("Python 3.4 or newer is required") and exit(1)) if sys.version_info < (3, 4) else exit(0)' || exit 1 $PYTHON3 -c 'import sys;(print("Python 3.4 or newer is required") and exit(1)) if sys.version_info < (3, 4) else exit(0)' || exit 1
exec "$PYTHON3" "$poezio_dir/src/poezio.py" -v "$args" "$@" exec "$PYTHON3" "$poezio_dir/poezio/poezio.py" -v "$args" "$@"

View file

@ -76,7 +76,7 @@ Options
Set the default browser started by the plugin Set the default browser started by the plugin
.. _Unix FIFO: https://en.wikipedia.org/wiki/Named_pipe .. _Unix FIFO: https://en.wikipedia.org/wiki/Named_pipe
.. _daemon.py: http://dev.louiz.org/projects/poezio/repository/revisions/master/raw/src/daemon.py .. _daemon.py: http://dev.louiz.org/projects/poezio/repository/revisions/master/raw/poezio/daemon.py
""" """
import platform import platform

View file

@ -4,7 +4,7 @@ by the file of this module.
A window is a little part of the screen, for example the input window, A window is a little part of the screen, for example the input window,
the text window, the roster window, etc. the text window, the roster window, etc.
A Tab (see the src/tabs module) is composed of multiple Windows A Tab (see the poezio.tabs module) is composed of multiple Windows
""" """
import logging import logging

View file

@ -38,12 +38,12 @@ def find_doc(before, path):
module_poopt = Extension('poezio.poopt', module_poopt = Extension('poezio.poopt',
extra_compile_args=['-Wno-declaration-after-statement'], extra_compile_args=['-Wno-declaration-after-statement'],
sources=['src/pooptmodule.c']) sources=['poezio/pooptmodule.c'])
# Create a link to the config file (for packaging purposes) # Create a link to the config file (for packaging purposes)
if not exists(join(current_dir, 'src', 'default_config.cfg')): if not exists(join(current_dir, 'poezio', 'default_config.cfg')):
link(join(current_dir, 'data', 'default_config.cfg'), link(join(current_dir, 'data', 'default_config.cfg'),
join(current_dir, 'src', 'default_config.cfg')) join(current_dir, 'poezio', 'default_config.cfg'))
# identify the git version # identify the git version
git_dir = join(current_dir, '.git') git_dir = join(current_dir, '.git')
@ -91,7 +91,7 @@ setup(name="poezio",
keywords=['jabber', 'xmpp', 'client', 'chat', 'im', 'console'], keywords=['jabber', 'xmpp', 'client', 'chat', 'im', 'console'],
packages=['poezio', 'poezio.core', 'poezio.tabs', 'poezio.windows', packages=['poezio', 'poezio.core', 'poezio.tabs', 'poezio.windows',
'poezio_plugins', 'poezio_plugins.gpg', 'poezio_themes'], 'poezio_plugins', 'poezio_plugins.gpg', 'poezio_themes'],
package_dir={'poezio': 'src', package_dir={'poezio': 'poezio',
'poezio_plugins': 'plugins', 'poezio_plugins': 'plugins',
'poezio_themes': 'data/themes'}, 'poezio_themes': 'data/themes'},
package_data={'poezio': ['default_config.cfg']}, package_data={'poezio': ['default_config.cfg']},
@ -106,8 +106,8 @@ setup(name="poezio",
'Screen autoaway plugin': 'pyinotify==0.9.4'}) 'Screen autoaway plugin': 'pyinotify==0.9.4'})
# Remove the link afterwards # Remove the link afterwards
if (exists(join(current_dir, 'src', 'default_config.cfg')) and if (exists(join(current_dir, 'poezio', 'default_config.cfg')) and
exists(join(current_dir, 'data', 'default_config.cfg'))): exists(join(current_dir, 'data', 'default_config.cfg'))):
unlink(join(current_dir, 'src', 'default_config.cfg')) unlink(join(current_dir, 'poezio', 'default_config.cfg'))

View file

@ -1 +0,0 @@
from poezio.poezio import main

View file

@ -3,7 +3,7 @@ Test the functions in the `common` module
""" """
import sys import sys
sys.path.append('src') sys.path.append('poezio')
import time import time
import pytest import pytest

View file

@ -8,7 +8,7 @@ import random
import sys import sys
import os import os
sys.path.append('src') sys.path.append('poezio')
class ConfigShim(object): class ConfigShim(object):
def get(self, *args, **kwargs): def get(self, *args, **kwargs):

View file

@ -8,7 +8,7 @@ import sys
import os import os
sys.path.append('src') sys.path.append('poezio')
import config import config

View file

@ -4,7 +4,7 @@ Test of the poopt module
import pytest import pytest
import sys import sys
sys.path.append('src') sys.path.append('poezio')
from poopt import cut_text from poopt import cut_text

View file

@ -4,7 +4,7 @@ Test the functions in the `theming` module
import sys import sys
import pytest import pytest
sys.path.append('src') sys.path.append('poezio')
from theming import dump_tuple, read_tuple from theming import dump_tuple, read_tuple

View file

@ -1,6 +1,6 @@
import pytest import pytest
import sys import sys
sys.path.append('src') sys.path.append('poezio')
class ConfigShim(object): class ConfigShim(object):
def get(self, *args, **kwargs): def get(self, *args, **kwargs):

View file

@ -5,7 +5,7 @@ Test the functions in the `xhtml` module
import pytest import pytest
import sys import sys
import xml import xml
sys.path.append('src') sys.path.append('poezio')
from xhtml import (poezio_colors_to_html, xhtml_to_poezio_colors, from xhtml import (poezio_colors_to_html, xhtml_to_poezio_colors,
parse_css, clean_text) parse_css, clean_text)

View file

@ -64,13 +64,3 @@ else
fi fi
make make
if [ -e src/slixmpp ]
then
echo ""
echo "The update script detected a slixmpp link in src/."
echo "This is probably due to the old update script, you should delete it"
echo "so that poezio can use the up-to-date copy inside the poezio-venv directory."
echo ""
fi