Add a symlink supybot pointing to src/ + move locales/ to src/

This looks like a more standard source tree, and allows for running tests without installing.
This commit is contained in:
Valentin Lorentz 2019-01-02 14:29:32 +01:00
parent 4693537055
commit b1db15c056
12 changed files with 9 additions and 16 deletions

1
.gitignore vendored
View File

@ -23,7 +23,6 @@ supybot.egg-info/
test-conf/
test-data/
test-logs/
src/version.py
INSTALL
README.txt
conf/

View File

@ -1,4 +1,4 @@
PYTHON=`which python`
PYTHON=`which python3`
DESTDIR=/
PROJECT=limnoria
@ -10,6 +10,9 @@ all:
@echo "make builddeb_py3 - Generate a deb package for Python 3"
@echo "make clean - Get rid of scratch and byte files"
test:
PATH=./scripts/:${PATH} PYTHONPATH=. $(PYTHON) ./scripts/supybot-test test --plugins-dir=plugins/
source:
$(PYTHON) setup.py sdist $(COMPILE)
@ -36,3 +39,4 @@ clean:
find . -name '*.pyc' -delete
rm debian/control
.PHONY: test

View File

@ -147,19 +147,9 @@ packages = ['supybot',
'supybot.plugins.Math.local',
]
package_dir = {'supybot': 'src',
'supybot.utils': 'src/utils',
'supybot.locales': 'locales',
'supybot.plugins': 'plugins',
'supybot.drivers': 'src/drivers',
'supybot.plugins.Dict.local': 'plugins/Dict/local',
'supybot.plugins.Math.local': 'plugins/Math/local',
}
package_data = {'supybot.locales': [s for s in os.listdir('locales/')]}
package_data = {'supybot.locales': [s for s in os.listdir('supybot/locales/')]}
for plugin in plugins:
package_dir['supybot.plugins.' + plugin] = 'plugins/' + plugin
locales_path = 'plugins/' + plugin + '/locales/'
locales_name = 'supybot.plugins.'+plugin
if os.path.exists(locales_path):
@ -210,8 +200,6 @@ setup(
# Installation data
packages=packages,
package_dir=package_dir,
package_data=package_data,
scripts=['scripts/supybot',

1
src/plugins Symbolic link
View File

@ -0,0 +1 @@
../plugins

1
supybot Symbolic link
View File

@ -0,0 +1 @@
src