mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-16 15:39:21 +01:00
Revert changes to the structure of sdist packages.
c87aacb690
b882d1cc00
b1db15c056
This commit is contained in:
parent
e7b076aa44
commit
71dbd39dd7
1
.gitignore
vendored
1
.gitignore
vendored
@ -23,6 +23,7 @@ supybot.egg-info/
|
|||||||
test-conf/
|
test-conf/
|
||||||
test-data/
|
test-data/
|
||||||
test-logs/
|
test-logs/
|
||||||
|
src/version.py
|
||||||
INSTALL
|
INSTALL
|
||||||
README.txt
|
README.txt
|
||||||
conf/
|
conf/
|
||||||
|
25
setup.py
25
setup.py
@ -48,10 +48,7 @@ if debug:
|
|||||||
if path:
|
if path:
|
||||||
os.chdir(path)
|
os.chdir(path)
|
||||||
|
|
||||||
if os.path.isdir('src'):
|
VERSION_FILE = os.path.join('src', 'version.py')
|
||||||
VERSION_FILE = os.path.join('src', 'version.py')
|
|
||||||
else:
|
|
||||||
VERSION_FILE = os.path.join('supybot', 'version.py')
|
|
||||||
version = None
|
version = None
|
||||||
try:
|
try:
|
||||||
if 'SOURCE_DATE_EPOCH' in os.environ:
|
if 'SOURCE_DATE_EPOCH' in os.environ:
|
||||||
@ -67,7 +64,7 @@ try:
|
|||||||
time.strptime(time.asctime(time.gmtime(date)))[:3])
|
time.strptime(time.asctime(time.gmtime(date)))[:3])
|
||||||
except:
|
except:
|
||||||
if os.path.isfile(VERSION_FILE):
|
if os.path.isfile(VERSION_FILE):
|
||||||
from supybot.version import version
|
from src.version import version
|
||||||
else:
|
else:
|
||||||
version = 'installed on ' + time.strftime("%Y-%m-%dT%H-%M-%S", time.gmtime())
|
version = 'installed on ' + time.strftime("%Y-%m-%dT%H-%M-%S", time.gmtime())
|
||||||
try:
|
try:
|
||||||
@ -75,7 +72,7 @@ try:
|
|||||||
except OSError: # Does not exist
|
except OSError: # Does not exist
|
||||||
pass
|
pass
|
||||||
if version:
|
if version:
|
||||||
fd = open(VERSION_FILE, 'a')
|
fd = open(os.path.join('src', 'version.py'), 'a')
|
||||||
fd.write("version = '%s'\n" % version)
|
fd.write("version = '%s'\n" % version)
|
||||||
fd.write('try: # For import from setup.py\n')
|
fd.write('try: # For import from setup.py\n')
|
||||||
fd.write(' import supybot.utils.python\n')
|
fd.write(' import supybot.utils.python\n')
|
||||||
@ -102,7 +99,7 @@ import shutil
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
plugins = [s for s in os.listdir(os.path.join('supybot', 'plugins')) if
|
plugins = [s for s in os.listdir('plugins') if
|
||||||
os.path.exists(os.path.join('plugins', s, 'plugin.py'))]
|
os.path.exists(os.path.join('plugins', s, 'plugin.py'))]
|
||||||
|
|
||||||
def normalizeWhitespace(s):
|
def normalizeWhitespace(s):
|
||||||
@ -150,9 +147,19 @@ packages = ['supybot',
|
|||||||
'supybot.plugins.Math.local',
|
'supybot.plugins.Math.local',
|
||||||
]
|
]
|
||||||
|
|
||||||
package_data = {'supybot.locales': [s for s in os.listdir('supybot/locales/')]}
|
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/')]}
|
||||||
|
|
||||||
for plugin in plugins:
|
for plugin in plugins:
|
||||||
|
package_dir['supybot.plugins.' + plugin] = 'plugins/' + plugin
|
||||||
locales_path = 'plugins/' + plugin + '/locales/'
|
locales_path = 'plugins/' + plugin + '/locales/'
|
||||||
locales_name = 'supybot.plugins.'+plugin
|
locales_name = 'supybot.plugins.'+plugin
|
||||||
if os.path.exists(locales_path):
|
if os.path.exists(locales_path):
|
||||||
@ -203,6 +210,8 @@ setup(
|
|||||||
# Installation data
|
# Installation data
|
||||||
packages=packages,
|
packages=packages,
|
||||||
|
|
||||||
|
package_dir=package_dir,
|
||||||
|
|
||||||
package_data=package_data,
|
package_data=package_data,
|
||||||
|
|
||||||
scripts=['scripts/supybot',
|
scripts=['scripts/supybot',
|
||||||
|
Loading…
Reference in New Issue
Block a user