mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-24 07:51:44 +00:00
Also clean docs generated files
This commit is contained in:
parent
c9a946bc02
commit
d6a0fcf4ad
12
setup.py
12
setup.py
@ -16,6 +16,7 @@
|
|||||||
# You should have received a copy of the GNU Lesser General Public License
|
# You should have received a copy of the GNU Lesser General Public License
|
||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
import os
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
from sys import argv
|
from sys import argv
|
||||||
@ -58,7 +59,9 @@ class Clean(Command):
|
|||||||
"pyrogram/api/errors/exceptions",
|
"pyrogram/api/errors/exceptions",
|
||||||
"pyrogram/api/functions",
|
"pyrogram/api/functions",
|
||||||
"pyrogram/api/types",
|
"pyrogram/api/types",
|
||||||
"pyrogram/api/all.py"
|
"pyrogram/api/all.py",
|
||||||
|
"docs/source/functions",
|
||||||
|
"docs/source/types"
|
||||||
]
|
]
|
||||||
|
|
||||||
user_options = []
|
user_options = []
|
||||||
@ -71,9 +74,12 @@ class Clean(Command):
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
for path in self.PATHS:
|
for path in self.PATHS:
|
||||||
|
try:
|
||||||
|
shutil.rmtree(path) if os.path.isdir(path) else os.remove(path)
|
||||||
|
except OSError:
|
||||||
|
print("skipping {}".format(path))
|
||||||
|
else:
|
||||||
print("removing {}".format(path))
|
print("removing {}".format(path))
|
||||||
shutil.rmtree(path, ignore_errors=True)
|
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="Pyrogram",
|
name="Pyrogram",
|
||||||
|
Loading…
Reference in New Issue
Block a user