Skip to content

Commit

Permalink
Bundle Anki 2.0.11 (in case the user doesn't have Anki installed).
Browse files Browse the repository at this point in the history
  • Loading branch information
dsnopek committed Sep 11, 2013
1 parent 53c02cd commit 67e36c9
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 17 deletions.
13 changes: 7 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
*~
*.pyc
.coverage
AnkiServer.egg-info
development.ini
server.log
collections
dist
/.coverage
/AnkiServer.egg-info
/development.ini
/server.log
/collections
/dist
/build
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "anki-bundled"]
path = anki-bundled
url = https://github.com/dae/anki.git
5 changes: 4 additions & 1 deletion AnkiServer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import sys
import sys, os.path
# We put the system installed Anki first!
sys.path.insert(0, "/usr/share/anki")
# We'll put our bundled Anki after it
sys.path.insert(1, os.path.join(os.path.dirname(os.path.dirname(__file__)), 'anki-bundled'))

__author__ = "David Snopek <dsnopek@gmail.com>"
__copyright__ = "Copyright (C) 2013 David Snopek"
Expand Down
1 change: 1 addition & 0 deletions anki-bundled
Submodule anki-bundled added at 1a9ef3
28 changes: 18 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@

try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from setuptools import setup

#try:
# from setuptools import setup
#except ImportError:
# from distutils.core import setup

def get_anki_bundled_files():
import os
data_files = []
for root, dirs, files in os.walk('anki-bundled'):
data_files.append((root, [os.path.join(root, f) for f in files]))
return data_files

setup(
name="AnkiServer",
Expand All @@ -13,18 +22,17 @@
author="David Snopek",
author_email="dsnopek@gmail.com",
url="https://github.com/dsnopek/anki-sync-server",
requires=[
"PasteDeploy (>=1.3.2)",
"PasteScript (>=1.7.3)",
"WebOb (>=0.9.7)",
"SQLAlchemy (>=0.6.3)",
],
install_requires=[
"PasteDeploy>=1.3.2",
"PasteScript>=1.7.3",
"WebOb>=0.9.7",
"SQLAlchemy>=0.6.3",
],
tests_require=[
'nose>=1.3.0',
'mock>=1.0.0',
],
data_files=get_anki_bundled_files(),
test_suite='nose.collector',
packages=['AnkiServer'],
classifiers=[
Expand Down

0 comments on commit 67e36c9

Please sign in to comment.