Skip to content
Snippets Groups Projects
setup.py 1.73 KiB
Newer Older
  • Learn to ignore specific revisions
  • tuhe's avatar
    tuhe committed
    """
    Use this guide:
    https://packaging.python.org/tutorials/packaging-projects/
    
    py -m build && twine upload dist/*
    
    tuhe's avatar
    tuhe committed
    linux: python -m build && python -m twine upload dist/*
    
    tuhe's avatar
    tuhe committed
    
    
    tuhe's avatar
    tuhe committed
    git add . && git commit -m"updates" && git push
    sudo pip install -e ./
    """
    
    tuhe's avatar
    tuhe committed
    import setuptools
    
    with open("src/unitgrade/version.py", "r", encoding="utf-8") as fh:
    
    tuhe's avatar
    tuhe committed
        __version__ = fh.read().split("=")[1].strip()[1:-1]
    
    tuhe's avatar
    tuhe committed
    # long_description = fh.read()
    
    with open("README.md", "r", encoding="utf-8") as fh:
        long_description = fh.read()
    
    
    tuhe's avatar
    tuhe committed
    
    
    tuhe's avatar
    tuhe committed
    setuptools.setup(
        name="unitgrade",
    
    tuhe's avatar
    tuhe committed
        version=__version__,
    
    tuhe's avatar
    tuhe committed
        author="Tue Herlau",
        author_email="tuhe@dtu.dk",
        description="A student homework/exam evaluation framework build on pythons unittest framework.",
        long_description=long_description,
        long_description_content_type="text/markdown",
    
    Tue Herlau's avatar
    Tue Herlau committed
        url='https://lab.compute.dtu.dk/tuhe/unitgrade',
    
    tuhe's avatar
    tuhe committed
        project_urls={
            "Bug Tracker": "https://lab.compute.dtu.dk/tuhe/unitgrade/issues",
        },
        classifiers=[
            "Programming Language :: Python :: 3",
            "License :: OSI Approved :: MIT License",
            "Operating System :: OS Independent",
        ],
        package_dir={"": "src"},
        packages=setuptools.find_packages(where="src"),
        python_requires=">=3.8",
        license="MIT",
    
    tuhe's avatar
    tuhe committed
        install_requires=['numpy', 'tabulate', "pyfiglet", "coverage", "colorama", 'tqdm', 'importnb', 'requests', "pandas",
    
                          'watchdog', 'flask_socketio', 'flask', 'Werkzeug', 'diskcache', # These are for the dashboard.
                          ],
    
    tuhe's avatar
    tuhe committed
        include_package_data=True,
        package_data={'': ['dashboard/static/*', 'dashboard/templates/*'],},  # so far no Manifest.in.
        entry_points={
            'console_scripts': ['unitgrade=unitgrade.dashboard.dashboard_cli:main'],
        }
    
    Tue Herlau's avatar
    Tue Herlau committed
    )