Browse Source

Finishing up packaging

master
Raphael Roberts 7 years ago
parent
commit
ae3ae90533
  1. 3
      .gitignore
  2. 2
      MANIFEST.in
  3. 7
      setup.py
  4. 0
      wordscape/__init__.py
  5. 9
      wordscape/candidate_cache.py

3
.gitignore

@ -4,3 +4,6 @@ __pycache__
*.html
*.pyd
/fits.c
/dist/*
/src/fits.c
/wordscape_cheats.egg-info/*

2
MANIFEST.in

@ -0,0 +1,2 @@
include requirements.txt
recursive-include src *

7
setup.py

@ -1,15 +1,18 @@
from setuptools import setup, find_packages
from setuptools.extension import Extension
from Cython.Build import cythonize
with open("requirements.txt") as file:
REQUIREMENTS = file.read().rstrip().split("\n")
extensions = [Extension("wordscape.fits", ["src/fits.pyx"])]
setup(
author="Raphael Roberts",
author_email="raphael.robets48@gmail.com",
description="Cheat for wordscape and wordscape like games",
entry_points=None,
ext_modules=cythonize("src/fits.pyx"),
entry_points={"console_scripts": ["wordscape=wordscape.main:main"]},
ext_modules=cythonize(extensions),
install_requires=REQUIREMENTS,
name="wordscape_cheats",
packages=find_packages(),

0
wordscape/__init__.py

9
wordscape/candidate_cache.py

@ -12,12 +12,9 @@ def candidates(letters, dictionary: Dictionary):
letters = "".join(letters)
possibilities = []
for word in dictionary.word_frequency.keys():
try:
if fits(letters, word):
possibilities.append(word)
except ZeroDivisionError:
breakpoint()
return word
if fits(letters, word):
possibilities.append(word)
return possibilities
class CandidateCache:

Loading…
Cancel
Save