diff --git a/bin/freenit.sh b/bin/freenit.sh index 39c1feb..9d8e2bf 100755 --- a/bin/freenit.sh +++ b/bin/freenit.sh @@ -50,14 +50,12 @@ backend() { cp -r ${PROJECT_ROOT}/project/* . case `uname` in *BSD) - ${SED_CMD} '' -e "s/NAME/${NAME}/g" setup.py ${SED_CMD} '' -e "s/NAME/${NAME}/g" main.py - ${SED_CMD} '' -e "s/PROJECT/${NAME}/g" pyproject.toml + ${SED_CMD} '' -e "s/NAME/${NAME}/g" pyproject.toml ;; *) - ${SED_CMD} -e "s/NAME/${NAME}/g" setup.py ${SED_CMD} -e "s/NAME/${NAME}/g" main.py - ${SED_CMD} -e "s/PROJECT/${NAME}/g" pyproject.toml + ${SED_CMD} -e "s/NAME/${NAME}/g" pyproject.toml ;; esac mv project ${NAME} diff --git a/freenit/__init__.py b/freenit/__init__.py index 334b899..a8d4557 100644 --- a/freenit/__init__.py +++ b/freenit/__init__.py @@ -1 +1 @@ -__version__ = "0.3.4" +__version__ = "0.3.5" diff --git a/freenit/cli.py b/freenit/cli.py index c0d0f55..a88f151 100644 --- a/freenit/cli.py +++ b/freenit/cli.py @@ -7,4 +7,4 @@ def main(): path = pathlib.Path(__file__).parent.resolve() project_name = prompt("Name of the project: ") - subprocess.run([f"{path}/bin/freenit.sh", "project", project_name]) + subprocess.run([f"{path}/../bin/freenit.sh", "project", project_name]) diff --git a/freenit/mail.py b/freenit/mail.py index 4e439a8..d8cab2d 100644 --- a/freenit/mail.py +++ b/freenit/mail.py @@ -7,7 +7,7 @@ def sendmail(to, message): mail = config.mail - server = SMTP(host=mail.host, port=mail.port) + server = SMTP(host=mail.server, port=mail.port) if mail.tls: server.ehlo() server.starttls() diff --git a/freenit/project/pyproject.toml b/freenit/project/pyproject.toml index ae8bcca..3e9662e 100644 --- a/freenit/project/pyproject.toml +++ b/freenit/project/pyproject.toml @@ -35,4 +35,4 @@ Homepage = "https://freenit.org" Repository = "https://github.com/freenit-framework/backend" [tool.hatch.version] -path = "PROJECT/__init__.py" +path = "NAME/__init__.py" diff --git a/freenit/project/setup.py b/freenit/project/setup.py deleted file mode 100644 index c001d16..0000000 --- a/freenit/project/setup.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python - -import pathlib - -from setuptools import find_packages, setup - -PROJECT_ROOT = pathlib.Path(__file__).parent -README = (PROJECT_ROOT / "README.md").read_text() - -setup( - name="NAME", - version="0.0.1", - description="REST API based on Freenit", - long_description=README, - long_description_content_type="text/markdown", - url="https://github.com/organization/backend", - author="John Doe", - author_email="john@example.com", - license="BSD", - classifiers=[ - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Topic :: Internet :: WWW/HTTP", - "Environment :: Web Environment", - "Framework :: FastAPI", - "License :: OSI Approved :: BSD License", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - ], - keywords=[ - "REST", - "openapi", - "swagger", - "fastapi", - ], - packages=find_packages(exclude=["tests*"]), - python_requires=">=3.8", - install_requires=["freenit[ormar]"], - extras_require={ - "build": ["freenit[build]"], - "dev": ["freenit[dev]"], - "test": ["freenit[test]"], - }, -)