Skip to content

Commit

Permalink
chore(setup): remove commands from setup.py
Browse files Browse the repository at this point in the history
Deleted specific commands from the setup.py file to simplify or adjust the setup process.
  • Loading branch information
khashashin committed Aug 20, 2023
1 parent 8e84dea commit c138f59
Showing 1 changed file with 2 additions and 38 deletions.
40 changes: 2 additions & 38 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,44 +1,13 @@
import os
from setuptools import setup, find_packages, Command
from setuptools import setup, find_packages

from pathlib import Path
this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()


class BuildCommand(Command):
description = 'Build the package'
user_options = []

def initialize_options(self):
pass

def finalize_options(self):
pass

def run(self):
os.system('python setup.py sdist')


class PublishCommand(Command):
description = 'Publish the package to PyPI'
user_options = [('version=', 'v', 'version number of the package to be uploaded')]
version = None

def initialize_options(self):
pass

def finalize_options(self):
if self.version is None:
raise Exception("Version number is required. Use --version=<version_number>")

def run(self):
os.system(f"twine upload ./dist/django-appwrite-{self.version}.tar.gz")


setup(
name='django-appwrite',
version='1.5.0',
version='1.5.1',
description='Django Middleware to authenticate users with Appwrite',
long_description=long_description,
long_description_content_type='text/markdown',
Expand All @@ -47,7 +16,6 @@ def run(self):
install_requires=['appwrite', 'django', 'djangorestframework'],
license='MIT',
author='Yusuf Khasbulatov',
readme='README.md',
keywords="appwrite auth django",
url='https://github.com/khashashin/django-appwrite',
project_urls={
Expand All @@ -69,8 +37,4 @@ def run(self):
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10"
],
cmdclass={
'build': BuildCommand,
'publish': PublishCommand,
},
)

0 comments on commit c138f59

Please sign in to comment.