1- import os
2- from setuptools import setup , find_packages , Command
1+ from setuptools import setup , find_packages
32
43from pathlib import Path
54this_directory = Path (__file__ ).parent
65long_description = (this_directory / "README.md" ).read_text ()
76
87
9- class BuildCommand (Command ):
10- description = 'Build the package'
11- user_options = []
12-
13- def initialize_options (self ):
14- pass
15-
16- def finalize_options (self ):
17- pass
18-
19- def run (self ):
20- os .system ('python setup.py sdist' )
21-
22-
23- class PublishCommand (Command ):
24- description = 'Publish the package to PyPI'
25- user_options = [('version=' , 'v' , 'version number of the package to be uploaded' )]
26- version = None
27-
28- def initialize_options (self ):
29- pass
30-
31- def finalize_options (self ):
32- if self .version is None :
33- raise Exception ("Version number is required. Use --version=<version_number>" )
34-
35- def run (self ):
36- os .system (f"twine upload ./dist/django-appwrite-{ self .version } .tar.gz" )
37-
38-
398setup (
409 name = 'django-appwrite' ,
41- version = '1.5.0 ' ,
10+ version = '1.5.1 ' ,
4211 description = 'Django Middleware to authenticate users with Appwrite' ,
4312 long_description = long_description ,
4413 long_description_content_type = 'text/markdown' ,
@@ -47,7 +16,6 @@ def run(self):
4716 install_requires = ['appwrite' , 'django' , 'djangorestframework' ],
4817 license = 'MIT' ,
4918 author = 'Yusuf Khasbulatov' ,
50- readme = 'README.md' ,
5119 keywords = "appwrite auth django" ,
5220 url = 'https://github.com/khashashin/django-appwrite' ,
5321 project_urls = {
@@ -69,8 +37,4 @@ def run(self):
6937 "Programming Language :: Python :: 3.9" ,
7038 "Programming Language :: Python :: 3.10"
7139 ],
72- cmdclass = {
73- 'build' : BuildCommand ,
74- 'publish' : PublishCommand ,
75- },
7640)
0 commit comments