Skip to content

Commit

Permalink
Merge pull request #116 from AVEgame/pypi-fix
Browse files Browse the repository at this point in the history
Change install directories so that PyPI installation works
  • Loading branch information
mscroggs authored Jul 5, 2020
2 parents bc8dcd2 + 027f630 commit 04ed63f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.9.2
1.9.3
6 changes: 5 additions & 1 deletion ave/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

debug = os.getenv("DEBUG")
ave_folder = os.path.dirname(os.path.realpath(__file__))
root_folder = os.path.join(ave_folder, "..")

if os.path.isfile(os.path.join(ave_folder, "VERSION")):
root_folder = ave_folder
else:
root_folder = os.path.join(ave_folder, "..")

folder_prefix = ""
if not os.path.isdir(os.path.join(root_folder, "games")):
Expand Down
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import setuptools
from ave.__main__ import make_json

if sys.version_info < (3, 5):
print("Python 3.5 or higher required, please upgrade.")
if sys.version_info < (3, 4):
print("Python 3.4 or higher required, please upgrade.")
sys.exit(1)

with open("VERSION") as f:
Expand All @@ -20,10 +20,10 @@
'ave-make-json = ave.__main__:make_json']}

data_files = [
("_avegames", [os.path.join("games", i) for i in os.listdir("games")
if i.endswith(".ave")]),
("_avescreens", ["screens/credits", "screens/title", "screens/user"]),
("", ["VERSION", "gamelist.json"])]
("ave/_avegames", [os.path.join("games", i) for i in os.listdir("games")
if i.endswith(".ave")]),
("ave/_avescreens", ["screens/credits", "screens/title", "screens/user"]),
("ave", ["VERSION", "gamelist.json"])]

if __name__ == "__main__":
setuptools.setup(
Expand Down

0 comments on commit 04ed63f

Please sign in to comment.