Added publish recipe
							parent
							
								
									4044c7551b
								
							
						
					
					
						commit
						4546a21014
					
				
							
								
								
									
										22
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										22
									
								
								Makefile
								
								
								
								
							| 
						 | 
					@ -43,6 +43,10 @@ clean-docs:
 | 
				
			||||||
	@ echo "Removing documentation build..."
 | 
						@ echo "Removing documentation build..."
 | 
				
			||||||
	@ [ ! -e "$(DOCS)/build" ] || rm -r "$(DOCS)/build"
 | 
						@ [ ! -e "$(DOCS)/build" ] || rm -r "$(DOCS)/build"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					clean-setup:
 | 
				
			||||||
 | 
						@ echo 'Removing build artifacts...'
 | 
				
			||||||
 | 
						@ [ ! -e "build" ] || rm -rf build
 | 
				
			||||||
 | 
						@ find . -maxdepth 1 -type d -name '*.egg-info' -exec rm -rf "{}" \;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# =====DOCS=====
 | 
					# =====DOCS=====
 | 
				
			||||||
$(VENV)/bin/sphinx-build: build-venv
 | 
					$(VENV)/bin/sphinx-build: build-venv
 | 
				
			||||||
| 
						 | 
					@ -64,15 +68,25 @@ test: pytest.ini $(VENV)/bin/pytest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# =====PACKAGING=====
 | 
					# =====PACKAGING=====
 | 
				
			||||||
package: README.md LICENSE setup.py test
 | 
					package: README.md LICENSE setup.py test clean-setup
 | 
				
			||||||
	@ echo "Removing build..."
 | 
						@ echo "Removing build..."
 | 
				
			||||||
	@ [ ! -e "dist" ] || rm -r "dist"
 | 
						@ [ ! -e "dist" ] || rm -r "dist"
 | 
				
			||||||
	@ echo "Updating wheel & setuptools..."
 | 
					 | 
				
			||||||
	@  "$(VENV)/bin/pip" install --upgrade --quiet setuptools wheel
 | 
					 | 
				
			||||||
	@ echo "Running setup.py..."
 | 
						@ echo "Running setup.py..."
 | 
				
			||||||
	@ "$(VENV)/bin/python" setup.py sdist bdist_wheel
 | 
						@ "$(VENV)/bin/python" setup.py sdist bdist_wheel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					publish: package
 | 
				
			||||||
 | 
						@ echo 'Installing twine...'
 | 
				
			||||||
 | 
						@ $(VENV)/bin/pip install --quiet --upgrade twine
 | 
				
			||||||
 | 
						@ [ git symbolic-ref HEAD --short = master ] && { \
 | 
				
			||||||
 | 
							echo 'Publishing to PyPi Testing...'; \
 | 
				
			||||||
 | 
							$(VENV)/bin/python -m twine upload dist/* ; \
 | 
				
			||||||
 | 
						} || { \
 | 
				
			||||||
 | 
							echo 'Publishing to PyPi Testing...'; \
 | 
				
			||||||
 | 
							$(VENV)/bin/python -m twine upload --repository testpypi dist/* ; \
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Publish will also come here someday
 | 
					# Publish will also come here someday
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: all clean clean-venv clean-cache clean-docs test package docs \
 | 
					.PHONY: all clean clean-venv clean-cache clean-docs test package docs \
 | 
				
			||||||
	build-venv run-venv
 | 
						build-venv run-venv clean-setup
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,2 +1,2 @@
 | 
				
			||||||
discord.py~=1.4.1
 | 
					discord.py>=1.4.1,<2.0.0
 | 
				
			||||||
PyYAML~=5.3.1
 | 
					PyYAML>=5.3.1,<6.0.0
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										32
									
								
								setup.py
								
								
								
								
							
							
						
						
									
										32
									
								
								setup.py
								
								
								
								
							| 
						 | 
					@ -0,0 +1,32 @@
 | 
				
			||||||
 | 
					# =====IMPORTS=====
 | 
				
			||||||
 | 
					# Third-party imports
 | 
				
			||||||
 | 
					import setuptools
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					with open('README.md', 'r') as readme:
 | 
				
			||||||
 | 
					    long_description = readme.read()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					with open('requirements.txt', 'r') as reqs_file:
 | 
				
			||||||
 | 
					    reqs = [line.strip() for line in reqs_file.readlines()]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setuptools.setup(
 | 
				
			||||||
 | 
					    name='frank-Chewing_Bever',
 | 
				
			||||||
 | 
					    version='0.0.1',
 | 
				
			||||||
 | 
					    author='Jef Roosens',
 | 
				
			||||||
 | 
					    author_email='',
 | 
				
			||||||
 | 
					    description='A modular tool for building Discord bots',
 | 
				
			||||||
 | 
					    long_description=long_description,
 | 
				
			||||||
 | 
					    long_description_content_type='text/markdown',
 | 
				
			||||||
 | 
					    url='https://gitlab.com/Chewing_Bever/frank',
 | 
				
			||||||
 | 
					    packages=setuptools.find_packages(),
 | 
				
			||||||
 | 
					    classifiers=[
 | 
				
			||||||
 | 
					        'Development Status :: 3 - Alpha',
 | 
				
			||||||
 | 
					        'Environment :: No Input/Output (Daemon)',
 | 
				
			||||||
 | 
					        'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
 | 
				
			||||||
 | 
					        'Operating System :: OS Independent',
 | 
				
			||||||
 | 
					        'Programming Language :: Python :: 3.8',
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
 | 
					    python_requires='>=3.8',
 | 
				
			||||||
 | 
					    install_requires=reqs,
 | 
				
			||||||
 | 
					    setup_requires=['wheel'],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
		Reference in New Issue